Summary

With the User Account Control (UAC) enabled by default in Windows Vista, you'll need to use an elevated Command Prompt whenever you need to do some administrative tasks from Command Prompt. For example, running regsvr32.exe command to register or unregister an DLL/ActiveX, launching a batch file or script requiring administrative privileges, and other tasks require you open an elevated Command Prompt. Elevated Command Prompt runs under administrative privileges.

This article describes different ways to open an elevated Command Prompt window.

Open an elevated Command Prompt window

Method 1

Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

Method 2

Click Start, type cmd.exe When the Instant search results are shown, right-click the cmd.exe entry and choose Run as administrator. Or using keyboard, select the cmd.exe in the Instant search results using the UP/DOWN arrow and press CTRL+SHIFT+ENTER on the keyboard. CTRL+SHIFT+ENTER runs a program elevated, but only works when using the Instant Search feature in the Windows Vista Start menu.

Method 3

Create a new desktop shortcut to CMD.EXE. Right-click on the shortcut and choose Run as administrator. To run the shortcut as an administrator by default, right-click the Command Prompt shortcut you created on the Desktop, and choose Properties. In the Shortcut tab, click Advanced. Place a checkmark near Run as administrator. Click OK and OK. Now, every time when you double-click the shortcut Command Prompt window will open elevated. You'll see the consent or the confirmation prompt anyway.

Note: If you're a frequent user of the Command Prompt, you can Pin it to the Start menu as well, and/or send a shortcut to the Quick Launch folder for easy reach.

Method 4

Apply the tweak I suggest in article How to open an elevated Command Prompt from the folder context menu in Windows Vista so that you can open an elevated Command Prompt from the context menu of a folder. The tweak adds the special runas verb to launch Command Prompt elevated. It adds an Open Command Prompt here (Administrator) option in the context menu for folders and Computer (formerly, My Computer). Here are the screenshots:

       

Click Start, click All Programs, click Accessories, right-click Command Prompt, and then click.

Note: You'll be prompted for a confirmation or administrator credentials when a program is run elevated. When you are prompted for an administrator password or for confirmation, type your password, or click Continue.

Screenshots


(Fig 1) Elevated Command Prompt
Note the word Administrator in the Window title.


(Fig 2) Command Prompt (normal)