On my computer, I have two admin accounts. The default admin account named "Administrator", and a new admin account named "testadmin." If I run the following commands: runas /user:testadmin cmd.exe
runas /user:localadmin "c:\users\localuser\desktop\control.exe" < password.txt What this does is use password.txt as input as if these are entered in console by a user. Every keypress you make that produces a character will be transmitted to your command. The downside is that you store the password in a textfile that can be opened.
Or "runas /user:administrator cmd.exe" - it does run a command prompt, it says "running as administrator" - but in reality it is not. I can right-click mybatch.cmd and "Run as administrator" : and that works fine.
When you use the runas shortcut that you created below, you will be prompted to enter the user's password in a command prompt before the program will run as the specified user.
runas /profile /savecred /user:OtherUserName regedit It asks for my password but after I type it in, I get RUNAS ERROR: Unable to run - regedit 740: The requested operation requires elevation. I understand that regedit has to be run as an administrator, but I am running the command prompt as administrator. OtherUserName is an Administrator type ...
I've read several threads about using the runas.exe command to start an elevated process. However, when I type try to use the command runas.exe /user:BruceWayne\\Administrator cmd.exe, the Command P...
runas /user:<username> batch_file.bat My batch file contains a pause command which should therefore require me to press Enter, and so I would at least expect the cmd window to persist until that point in my batch file.
For anyone stumbling upon this while searching for a way to use runas with an application where its own parameters may contain spaces. The original accepted answer with \" did not work for me. What works is to put a double quote to actually be able to pass arguments with spaces: runas.exe /user:domain\username "perfmon.exe ""argument with spaces"" /res" It is actually explained quite nicely ...
I don't think such an option exists. As a work around you could start the command line as an admin and execute the following command to run the command line with admin privileges as the other user. runas /netonly /user:YourUser cmd.exe
I am a beginner and am trying to understand how to use the runas command in Windows Powershell. When I type the following command into Powershell: runas /user:<localmachinename>\administrator...