Home » Questions » Unexperienced [ Ask a new question ]

"Run as" for a .bat file

"Run as" for a .bat file

I'd like to run a .bat file as a different user to troubleshoot a rights problem which I suspect.

Asked by: Guest | Views: 438
Total answers/comments: 3
Guest [Entry]

"Use the command line. For example,

runas /noprofile /user:COMPUTERNAME\USERNAME ""C:\MYBAT.bat""

See more about the command in the reference documentation for Runas."
Guest [Entry]

"For normal .Exe files you can get Run as Menu by pressing Shift + Rightclick. But this method does not work
for .bat and .cmd files. So you have add that option by creating Registry file

Right click on Desktop
click on New
Then select Notepad
Now copy the code written below to this notepad file

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
@=""\""%1\"" %*""

Now press ""Ctrl + s"" to save this file
save it with ""Runas.reg"" on desktop or other place you want
Now right click on ""Runas.reg"" file
click on ""Merge"""
Asbfwa [Entry]

oral lipitor 10mg <a href="https://lipiws.top/">brand atorvastatin 10mg</a> order lipitor 20mg online cheap