I want to run a batch file as a different user, via the Windows -> Run
dialogue.
I have tried:
runas /profile /user:test CMD "C:\Users\MyName\Desktop\Run.bat"
runas /profile /user:test "CMD "C:\Users\MyName\Desktop\Run.bat""
runas /profile /user:test "CMD \"C:\Users\MyName\Desktop\Run.bat\""
runas /profile /user:test "CMD \"C:\Users\MyName\Desktop\Run.bat"\"
but still no luck. It opens up CMD and asks me for my password. I enter it, and it opens another CMD window using the other username, but it doesn't run the bat. Instead, the title bar just says
Administrator: cmd "C:\Users\MyName\Desktop\Run.bat" (running as Home-PC\test)
Can anyone please help?
No comments:
Post a Comment