Windows Vista

Vista Command Prompt

The Command Prompt is a native Windows program that lets you execute commands without using a GUI. You can accomplish pretty much every task in the Command Prompt as you can with the GUI and a mouse. The Command Prompt gets its roots (arguably) from a combination of UNIX and MS-DOS. Consider it “Windows without the windows.”

Microsoft has streamlined your ability to launch Command Prompt sessions in Windows Vista. Besides accessing the Command Prompt through the Start Menu, the following are three other methods to launch the Command Prompt with varying permission-levels.

Shift and Right-Click

You can hold down shift and right-click and you will get the option to “Open Command Window Here.” This will open a Command Prompt that is queued to your current directory.

Sponsored Content

Passwords Haven’t Disappeared Yet

123456. Qwerty. Iloveyou. No, these are not exercises for people who are brand new to typing. Shockingly, they are among the most common passwords that end users choose in 2021. Research has found that the average business user must manually type out, or copy/paste, the credentials to 154 websites per month. We repeatedly got one question that surprised us: “Why would I ever trust a third party with control of my network?

For example, if I use the above command on the desktop, the corresponding Command Prompt session will be set to C:\Users\asdf\Desktop”:

Creating an Administrator Session Shortcut

Alternatively, you can create a shortcut to give yourself an elevated (administrator) Command Prompt session by right-clicking on the desktop and creating a shortcut:

For the location of the item type “cmd” and click Next:

Name the shortcut “cmd” and click Finish:

Your shortcut will now be created. Right-click on the shortcut and choose “Properties”:

In the properties dialog, select the “Shortcut” tab, and click Advanced…

In the Advanced Properties, check “Run as administrator,” and click Ok:

Anytime you launch the shortcut, you will have administrator privileges, and your Command Prompt session will start in “C:\Windows\system32” instead of the normal “C:\Users“:

Right-click for administrator privileges

Additionally, you can edit the registry to add a right-click option for "Administrator Command Prompt Here." This is useful if you are buried in a directory and want to launch an administrator session on the fly.

Note: Editing the registry has the potential to cause serious (and unrecoverable) damage to your PC. If you are at all uncomfortable editing the registry, please do not attempt the following.

Copy the following text into a Notepad file and save the file as AdminPrompt.reg:

 Windows Registry Editor Version 5.00


[HKEY_CLASSES_ROOT\Directory\shell\runas] @="Administrator Command Prompt here" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Directory\shell\runas\command] @="cmd.exe /k \"pushd %L && title Command Prompt\"" [HKEY_CLASSES_ROOT\Drive\shell\runas] @="Administrator Command Prompt here" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Drive\shell\runas\command] @="cmd.exe /k \"pushd %L && title Command Prompt\""

Open your registry by clicking the Start Menu and typing “regedit.” Windows will prompt you for confirmation before running the Registry Editor. In the File menu click Import

Navigate to your AdminPrompt.reg file and click Open:

You will get the following message that says “The keys and values contained in AdminPrompt.reg have been successfully added to the registry.” Click Ok:

Whenever you right-click a directory, you will now have the option of launching an Administrator Command Prompt Session queued for that current directory:


Here is what you’ve learned to do:

  • Shift + right-click and open a user-privileged Command Prompt session
  • Right-click and open an administrator-privileged Command Prompt session
  • Create an administrator-privileged Command Prompt shortcut
  • Import a registry file

Related Links

Related Topics:

Don't leave your business open to attack! Come learn how to protect your AD in this FREE masterclass!REGISTER NOW - Thursday, December 2, 2021 @ 1 pm ET

Active Directory (AD) is leveraged by over 90% of enterprises worldwide as the authentication and authorization hub of their IT infrastructure—but its inherent complexity leaves it prone to misconfigurations that can allow attackers to slip into your network and wreak havoc. 

Join this session with Microsoft MVP and MCT Sander Berkouwer, who will explore:

  • Whether you should upgrade your domain controllers to Windows Server
    2019 and beyond
  • Achieving mission impossible: updating DCs within 48 hours
  • How to disable legacy protocols and outdated compatibility options in
    Active Directory

Sponsored by: