Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET
Windows Vista

How can I quickly open Command Prompt (cmd) with elevated credentials in Windows Vista?

How can I quickly open Command Prompt (cmd) with elevated credentials in Windows Vista?

As you’ve learned so far, Windows Vista has the built-in ability to automatically reduce the potential of security breeches in the system. It does that by automatically lower the administrative rights of users that are part of the local administrators group, and forces them to run applications and commands like they were regular users with no administrative privileges.

For example, if you ran CMD as a user that was a part of the Local Administrator’s group, or even as the Administrator himself, you’d get a nice Command Prompt window:

Sponsored Content

Say Goodbye to Traditional PC Lifecycle Management

Traditional IT tools, including Microsoft SCCM, Ghost Solution Suite, and KACE, often require considerable custom configurations by T3 technicians (an expensive and often elusive IT resource) to enable management of a hybrid onsite + remote workforce. In many cases, even with the best resources, organizations are finding that these on-premise tools simply cannot support remote endpoints consistently and reliably due to infrastructure limitations.

Now try to run any command that requires administrative rights, for instance use the following command as a test:

​net user administrator [email protected]!

Lamer note: This command will change the administrator’s password to "[email protected]!", don’t run it, it’s just an example. And if you do run it, change the password to whatever string you want. Don’t come crying that you can’t logon to the computer anymore after changing the password!

Note that the command refuses to run because of permission issues.

So how do we perform administrative tasks in Windows Vista?

In order to gain your administrative rights you need to use the RUNAS command from the command prompt, or from the Graphical User Interface (GUI) by right-clicking the required application and selecting the "Run as administrator" option:

After selecting that option you need to pass the UAC prompt by pressing "Continue" (unless you’ve already disabled it. Read What’s User Account Control in Windows Vista? and Disable User Account Control in Windows Vista for more info)

Instead of using the RUNAS command from the command prompt or the GUI "Run as administrator" option you can perform the following trick:

Note: This tip seems to only work with .EXE files, and does not work for shortcuts.

  1. Click on the Vista logo (used to be the "Start" button.

  2. In the "Start Search" box type the name of the program you want to run as administrator. For example type CMD or CMD.EXE.

  1. Do NOT hit ENTER. Instead hit CTRL+SHIFT+ENTER. It seems that this key combo triggers user account elevation and is identical to the RUNAS command or the GUI "Run as administrator" option.

  2. You will be prompted by the UAC warning window. Click on CTRL+C or click on the "Continue" button.

  1. Note that the CMD window has an "Administrator:" appended to the window title.

  1. You can now perform any administrative tasks you want.

Related articles

You might also want to read the following related articles:

Related Topics: