1

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 Prompt opens up asking for my password, but it won't let me enter it.

Runas.exe attempt - can't enter password

I can press Enter and the Command Prompt will close, but I can't get anywhere beyond this. Does anyone have any ideas as to why this might be happening?

QMord
  • 696

2 Answers2

2

If you entered the command as your provided it should prompt you for the password for BruceWayne\Administrator not brucewayne.

I guess I am a little confused about what you are trying to do in your example. If you want to open command prompt as administrator why not right click cmd.exe and select Run as administrator?

runas allows you to run a program as another user. Depending on whether or not Secure Desktop in enabled on the computer this may or may not do what you want it to. If you just want to run a program as administrator you can often right click the program and select Run as administrator. You can use runas to run a program as any other user not just as the administrator. In fact, using runas to run a program as administrator may not work depending on your Secure Desktop and UAC configuration. It is not enough to run the program as the administrator, you also need to get the program to run with elevated privileges. runas is not the proper solution to accomplish that. http://arstechnica.com/civis/viewtopic.php?t=1121817

Let's say though that you are logged into a computer as the user Administrator and you wanted to run Outlook as Bob. You can run the command below to open Outlook as Bob without logging out of Administrator.

runas /user:bob "C:\Program Files\Microsoft Office 15\root\office15\OUTLOOK.EXE"

If you are logged into a computer as the user Administrator and you wanted to run Outlook as the domain user Bob when you are logged into a computer joined to the example.loc domain you would change the command slightly to what is shown below.

runas /user:example\bob "C:\Program Files\Microsoft Office 15\root\office15\OUTLOOK.EXE"

You can find more information about the syntax for run as by entering the below command in command prompt:

runas /?

1

It does let you enter. However for protection reasons it does not show in the prompt while entering. You just got to type your password and then hit enter and the command will be executed correctly.

Yisroel Tech
  • 13,220