How to 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...
Install
-
Open Notepad by going to Start → All Programs → Accessories → Notepad. - Copy codes given below and paste them in Notepad.
[version] signature="$CHICAGO$" [CmdHereAsAdminInstall] CopyFiles = CmdHereAsAdmin.Files.Inf AddReg = CmdHereAsAdmin.AddReg [DefaultInstall] CopyFiles = CmdHereAsAdmin.Files.Inf AddReg = CmdHereAsAdmin.AddReg [DefaultUnInstall] DelFiles = CmdHereAsAdmin.Files.Inf DelReg = CmdHereAsAdmin.DelReg [SourceDisksNames] 55="CMD Prompt Here as Administrator","",1 [SourceDisksFiles] CmdHereAsAdmin.INF=55 [DestinationDirs] CmdHereAsAdmin.Files.Inf = 17 [CmdHereAsAdmin.Files.Inf] CmdHereAsAdmin.INF [CmdHereAsAdmin.AddReg] HKLM,%UDHERE%,DisplayName,,"%CmdHereAsAdminName%" HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%CmdHereAsAdmin.inf" HKCR,DirectoryShellrunas,,,"%CmdHereAsAdminAccel%" HKCR,DirectoryShellrunascommand,,,"%11%cmd.exe /k cd /d ""%1""" HKCR,DriveShellrunas,,,"%CmdHereAsAdminAccel%" HKCR,DriveShellrunascommand,,,"%11%cmd.exe /k cd /d ""%1""" [CmdHereAsAdmin.DelReg] HKLM,%UDHERE% HKCR,DirectoryShellrunas HKCR,DriveShellrunas [Strings] CmdHereAsAdminName="CMD Prompt Here as Administrator PowerToy (Uninstall only)" CmdHereAsAdminAccel="CMD here as Admin" UDHERE="SoftwareMicrosoftWindowsCurrentVersionUninstallCmdHereAsAdmin"
-
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. -
Go to the location where you just saved the "CmdHereAsAdmin.inf" file. Right click on the file and click on "Install" from context menu. -
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
-
Go to Start → Control Panel → Add or Remove Programs. -
Click on the Remove for CMD Prompt Here as Administrator PowerToy (Uninstall only) entry.
You've just finished reading the article "How to Add an 'Open Command Prompt Here As Administrator' Shortcut to the Context Menu in Windows 7 and Windows Vista" edited by the TipsMake team. You can save how-to-add-an-open-command-prompt-here-as-administrator-shortcut-to-the-context-menu-in-windows-7-and-windows-vista.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.
- How to add 'Open PowerShell window here as administrator' to the right-click menu on Windows 10
- How to add Open command window here to Windows 10 right-click menu
- Add Command Prompt to Power User Menu on Windows 10
- How to use the command history function in Command Prompt
- How to add the Open Powershell Here option to the context menu on Windows
- How to Add an 'Open With Notepad As Administrator' Shortcut to the Context Menu in Windows 7 and Windows Vista
- How to Open Command Prompt on Windows
- How to Open Terminal in Windows
- 5 tips to quickly open CMD Admin on Windows
- Create a shortcut for the Run command, pin the Run command to the Taskbar and Start Menu on Windows 10.
- How to Make Command Prompt Appear at School
- Open folder in Command Prompt (CMD)
- How to add / remove 'Open in Windows Terminal' context menu in Windows 10
- Run CMD with administrator privileges on Windows 7, 8, 8.1, and 10.





