Add an "Open Command Prompt Here As Administrator" Shortcut to the Context Menu in Windows 7 and Windows Vista

In Windows Vista and Windows 7, when you want to open a command prompt starting with a certain path, this can be a tedious process and sometimes you'll notice that some programs won't run from the command prompt at all, because they require administrator privileges. There's an easy way to address both of these issues by adding a special menu item in the Windows context menu, which will allow you to open any folder in the command prompt running as administrator.

Steps

Install

  1. Open Notepad by going to Start → All Programs → Accessories → Notepad.
  2. Copy codes given below and paste them in Notepad.

  1. In Notepad, go to File → Save As... and save the file with name CmdHereAsAdmin.inf. Be sure to change the Save as Type: from Text Documents to All Files.
  2. Go to the location where you just saved the "CmdHereAsAdmin.inf" file. Right click on the file and click on "Install" from context menu.
  3. To try it, right-click any folder in Windows Explorer and you will see a new menu item called "CMD here as Admin". Click on that option and Command Prompt will appear.

Uninstall

  1. Go to Start → Control Panel → Add or Remove Programs.
  2. Click on the Remove for CMD Prompt Here as Administrator PowerToy (Uninstall only) entry.

Tips

Related Articles