Elevate a Command Prompt in Windows 7

You may need to elevate the Command Prompt in Windows 7 to perform administrative duties from time to time. There are many more methods to elevate the Command Prompt but in this post I will show a 3 step process.

Elevate Command Prompt – Start Menu

  1. Click Start Orb.
  2. Type:

    cmd

  3. Right-click cmd to select Run as Administrator.

    Start Menu - Launch Elevated Command Prompt

    Tip

    Use CTRL+SHIFT+ENTER to elevate the Command Prompt instead of using the Right-click method above.

Version 1.2
Edited: April 11, 2014

Turning On UAC Prompting in Windows Vista

I highly recommend leaving Windows Vista UAC (User Account Control) on at all times to help you control software starting without your consent. If any of your programs are not working because of UAC then these programs are not compatible with Windows Vista, the end-user (you) should be looking for a compatible version of the program or a patch from the software maker to have the program completely compatible with Windows Vista.

Turning On UAC (User Account Control) in Windows Vista – System Configuration (msconfig) Method

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

  1. Click on the Start Orb (commonly known as the Start button).
  2. Type msconfig in the Start Search field on the Start Menu. Refer to Step 1 on the Image below.
  3. The Programs in the Start Menu in the left pane will populate. "msconfig.exe" should appear. Right-click on msconfig.exe (Step2) to select Run as administrator to launch the msconfig utility (System Configuration). Refer to Image below.

     

  4. A UAC Prompt should appear to allow access to the elevated System Configuration Utility (msconfig). Click on Continue to allow the elevated System Configuration Utility (msconfig) to open. Refer to the Image below.

     

  5. The System Configuration Utility (msconfig) will open allowing you to turn on UAC (User Account Control) by selecting the Tools tab then selecting Enable UAC. Click Launch to turn on UAC. Refer to Image below.

     

  6. If you see the following windows then you have successfully disabled UAC (User Account Control) for Windows Vista. Refer to Image below.

     

  7. Restart your computer to apply the changes.

Turning On UAC (User Account Control) in Windows Vista – User Account Method

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

  1. Click on the Start Orb (commonly known as the Start button).
  2. Type User Accounts in the Start Search field on the Start Menu. Refer to Step 1 on the Image below.
  3. The Programs in the Start Menu in the left pane will populate. "User Accounts" should appear. Click to open the User Accounts window. Refer to Step 2 on Image below.

     

  4. Click Turn User Account Control on or off to turn on UAC(User Account Control. Refer to Image below.

     

  5. Place a checkmark for Use User Account Control (UAC) to help protect your computer to turn on UAC (User Account Control). Click OK to continue. Refer to Image below.

     

  6. Click Restart Now to apply the changes. Refer to Image below.

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

Related Articles

Version 1.3
Edited: May 4, 2012

Turning Off UAC Prompting in Windows Vista

You may need or want to turn off UAC (User Account Control) in Windows Vista for some unforeseen reason. If you need to turn off UAC please only turn it off temporarily until you are done performing the tasks that needs UAC off. Once the task is completed the please turn on UAC immediately using "Turning On UAC Prompting in Windows Vista" directions. If any of your programs are not working because of UAC then these programs are not compatible with Windows Vista, the end-user (you) should be looking for a compatible version of the program or a patch from the software maker to have the program completely compatible with Windows Vista.

I would highly recommend you leave UAC on in Windows Vista to help you protect your computer from unwanted software starting without your consent.

Turning Off UAC (User Account Control) in Windows Vista – System Configuration (msconfig) Method

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

  1. Click on the Start Orb (commonly known as the Start button).
  2. Type msconfig in the Start Search field on the Start Menu. Refer to Step 1 on the Image below.
  3. The Programs in the Start Menu in the left pane will populate. "msconfig.exe" should appear. Right-click on msconfig.exe (Step2) to select Run as administrator to launch the msconfigutility (System Configuration). Refer to Image below.

     

  4. A UAC Prompt should appear to allow access to the elevated System Configuration Utility (msconfig). Click on Continue to allow the elevated System Configuration Utility (msconfig) to open. Refer to the Image below.

     

  5. The System Configuration Utility (msconfig) will open allowing you to turn off UAC (User Account Control) by selecting the Tools tab then selecting Disable UAC. Click Launch to turn off UAC. Refer to Image below.

     

  6. If you see the following windows then you have successfully disabled UAC (User Account Control) for Windows Vista. Refer to Image below.

     

  7. Restart your computer to apply the changes.

Turning Off UAC (User Account Control) in Windows Vista – User Account Method

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

  1. Click on the Start Orb (commonly known as the Start button).
  2. Type User Accounts in the Start Search field on the Start Menu. Refer to Step 1 on the Image below.
  3. The Programs in the Start Menu in the left pane will populate. "User Accounts" should appear. Click to open the User Accounts window. Refer to Step 2 on Image below.

     

  4. Click Turn User Account Control on or off to turn off UAC(User Account Control. Refer to Image below.

     

  5. A UAC Prompt should appear to allow access to turn off UAC (User Account Control). Click on Continue to continue with turning off UAC(User Account Control). Refer to the Image below.

     

  6. Uncheck Use User Account Control (UAC) to help protect your computer to turn off UAC (User Account Control). Click OK to continue. Refer to Image below.

     

  7. Click Restart Now to apply the changes. Refer to Image below.

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

Related Articles

Version 1.2
Edited: May 4, 2012

Adding an Elevated “Command Prompt Here” for Folders and Drives Context Menu

Adding an "Elevated Command Prompt" here for Folders and Drives context menus in Windows Vista is pretty much the same way as you do in Windows XP. You will need administrative privileges (which means Elevated Privileges for Windows Vista) to add the entries in the registry because this is a system-wide change.

The "Elevated Command Prompt" here context menu is a very useful because when you right-click on a folder to select "Elevated Command Prompt" then the Command Prompt window will open with elevated permission at that folder’s location. For example, if you right-click on "c:\program files\program.folder" then the Command Prompt will open with elevated permissions at "c:\programs files\program.folder".

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

    

CAUTION

Editing the Windows Vista registry can cause serious issues such as system instability when editing/deleting the wrong entries. Please use the Registry Editor with extreme caution.

CAUTION

Before making any changes to the Windows Vista Registry, please backup your Windows Vista Registry by creating a System Restore point using the direction from "Create a System Restore Point".

To Add "Command Prompt Here" to a Folder or Drive Context Menu with Elevated Privileges – Manual Method

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

For Folders

  1. Open the Registry Editor with Elevated Privileges, refer to "Opening the Registry Editor with Elevated Privileges" blog article for instructions.
  2. Navigate to:

    HKCR\Directory\shell

  3. Create a new key by right-clicking "shell" to select New > Key. Name the new key RunAs.
  4. Double-click (default)located at:

    HKCR\Directory\shell\RunAs

  5. Enter the following in the Value Data filed:Elevated Command Prompt
  6. Create a new key by right-clicking "RunAs" to select New > Key. Name the new key command.
  7. Double-click (default)located at:

    HKCR\Directory\shell\RunAs\command

  8. Enter the following in the Value Data field:

    cmd.exe /s /k pushd "%V"

    [HKCR\Directory\shell\RunAs]
    Name: (default)
    Type: REG_SZ
    Data: Elevated Command Prompt

    [HKCR\Directory\shell\RunAs\command]
    Name: (default)
    Type: REG_SZ
    Data: cmd.exe /s /k pushd "%V"

For Drives

  1. Open the Registry Editor with Elevated Privileges, refer to "Opening the Registry Editor with Elevated Privileges" blog article for instructions.
  2. Navigate to:

    HKCR\Drive\shell

  3. Create a new key by right-clicking "shell" to select New > Key. Name the new key RunAs.
  4. Double-click (default)located at:

    HKCR\Drive\shell\RunAs

  5. Enter the following in the Value Data filed:Elevated Command Prompt
  6. Create a new key by right-clicking "RunAs" to select New > Key. Name the new key command.
  7. Double-click (default)located at:

    HKCR\Drive\shell\RunAs\command

  8. Enter the following in the Value Data field:

    cmd.exe /s /k pushd "%V"

    [HKCR\Drive\shell\RunAs]
    Name: (default)
    Type: REG_SZ
    Data: Elevated Command Prompt

    [HKCR\Drive\shell\RunAs\command]
    Name: (default)
    Type: REG_SZ
    Data: cmd.exe /s /k pushd "%V"

To Add "Command Prompt Here" to a Folder or Drive Context Menu with Elevated Privileges – Using Reg Add

  1. Open a command prompt with Elevated Privileges, refer to "Opening an Elevated Command Prompt" blog article for instructions.
  2. Type the following in the elevated commands prompt window:
    • For Folders:

      reg add HKCR\Directory\shell\RunAs /ve /d "Elevated Command Prompt"

      reg add HKCR\Directory\shell\RunAs\command /ve /d "cmd.exe /s /k pushd \"%V\""

    • For Drives:

      reg add HKCR\Drive\shell\RunAs /ve /d "Elevated Command Prompt"

      reg add HKCR\Drive\shell\RunAs\command /ve /d "cmd.exe /s /k pushd \"%V\""

To Add "Command Prompt Here" to a Folder or Drive Context Menu with Elevated Privileges – Using a Registration File – Method 1

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

  1. Download RunAs.Cmd.Here.reg to a folder on your hard drive.
  2. Open a command prompt with Elevated Privileges, refer to "Opening an Elevated Command Prompt" blog article for instructions.
  3. Change directories to the folder where you saved RunAs.Cmd.Here.reg. For example, if you saved the RunAs.Cmd.Here.reg file to "c:\users\Bill", then type the following in the elevated command prompt window:

    cd "c:\users\Bill"

  4. Then type the following in the elevated command prompt window to merge the registration file into the registry:

    RunAs.Cmd.Here.reg

  5. Click Yes to confirm you want to merge the RunAs.Cmd.Here.reg file into the registry.
  6. A confirmation window will appear asking if you want to merge the RunAs.Cmd.Here.reg registration file into the Windows Vista registry. Click Yes to continue with the merge of the registration file. Refer to Image below.

  7. If you are successful with merge of the RunAs.Cmd.Here.reg registration file then the following window should appear. Refer to Image below.

    NOTES

    The RunAs.Cmd.Here.reg file is from my company web server (http://lprf.homeserver.com).  You also can view the contents of the RunAs.Cmd.Here.reg file by right-clicking the file and selecting Edit. You may need to log off then log on to your user account or restart your computer for the changes to take affect.

To Add "Command Prompt Here" to a Folder or Drive Context Menu with Elevated Privileges – Using a Registration File – Method 2

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

  1. Download RunAs.Cmd.Here.reg to a folder on your hard drive.
  2. If you have added "Run as Administrator" context menu for registration file using this article, "Adding "Run as Administrator" to a Registration File Context Menu" then right-click RunAs.Cmd.Here.reg to select Run as administrator.
  3. A UAC Prompt should appear to allow access to the elevated Registration merge. Click on Continue to allow the elevated Registration merge to continue. Refer to the Image below.

  4. A confirmation window will appear asking if you want to merge the RunAs.Cmd.Here.reg registration file into the Windows Vista registry. Click Yes to continue with the merge of the registration file. Refer to Image below.

  5. If you are successful with merge of the RunAs.Cmd.Here.reg registration file then the following window should appear. Refer to Image below.

    NOTES

    The RunAs.Cmd.Here.reg file is from my company web server (http://lprf.homeserver.com).  You also can view the contents of the RunAs.Cmd.Here.reg file by right-clicking the file and selecting Edit. You may need to log off then log on to your user account or restart your computer for the changes to take affect.

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

Related Articles

Platforms Tested

  • Microsoft Windows Vista, x86 versions

Version 1.5
Edited: May 3, 2012

Opening the Registry Editor with Elevated Privileges

You may need to open an Elevated Registry in Windows Vista to edit registry entries that are located in the system entries such as HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT. You do not need to open an elevated registry to edit your user registry (HKEY_CURRENT_USER). If you do edit the HKEY_CURRENT_USER when you are working with an elevated registry then you are not editing your user’s registry. You are actually editing the account that lets you have elevated privileges. Here are the instructions that I use to open the Windows Vista Registry with Elevated Privileges.

WARNING

Editing the Windows Vista registry can cause serious issues such as system instability when editing/deleting the wrong entries. Please use the Registry Editor with extreme caution.

CAUTION

Before making any changes to the Windows Vista Registry, please backup your Windows Vista Registry by creating a System Restore point using the direction from "Create a System Restore Point".

Opening an Elevated Registry

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

  1. Click on the Start Orb (commonly known as the Start button).
  2. Type regedit in the Start Search field on the Start Menu. Refer to Step 1 on the Image below.
  3. The Programs in the Start Menu in the left pane will populate. "regedit.exe" should appear. Right-click on regedit.exe to access the context menu. Refer to Step 2 on the Image below.
  4. Select Run as administrator in the Context menu for "regedit.exe". Refer to Step 3 on the Image below.
     

  5. A UAC Prompt should appear to allow access to the elevated Registry Editor. Click on Continue to allow the Elevated Registry Editor to open. Refer to the Image below.
     

  6. The Registry Editor window will open with elevated privileges. Refer to Image below.
     

NOTE

To enlarge the images, simply click on the images you would like to view. With Internet Explorer 7, you can right-click on the image to select Open in New Tab.

Related Articles

Version 1.5
Edited: May 3, 2012