Command Prompt with administrative rights allows users to execute the commands with full rights. Some of the command lines cannot be executed using standard Command Prompt and you need to launch elevated command prompt. If you constantly use Command Prompt with administrative privileges then you might like to add “Open command window as administrator” context menu for the quick access.
Whenever you right click on a folder, drive or background you will see “Open command window as administrator” context menu.
You need to edit your Windows Registry in order to add this particular context menu.
Note: You must be signed in as an administrator to add/remove or use “Open command window as administrator” context menu.
To Add “Open command window as administrator” Context Menu on Windows 10
- Type regedit on Windows search box and hit Enter key to open the Registry Editor on your Windows 10 PC.
- Navigate the following path in your Windows registry editor.
- Right click on the “shell”, select New and then Key option. A new key will be created. Name it as “OpenCmdAsAdmin”.
- Now right click on “OpenCmdAsAdmin”, select New and then Key option to create another key. Name it as “command”.
- After creating keys, select “OpenCmdAsAdmin” and then you need to change the default value. Double click on Default on the right pane of Registry Editor.
- Set the value data as “Open command window as administrator” and hit OK.
- Right click on “OpenCmdAsAdmin”, select New and then click on “String value”. Name it as “Icon” and set the value as “imageres.dll,-5324”. Click OK.
- Select Command key and edit its default value by double clicking on “Default”.
- Set the value as follows and click OK.
PowerShell -windowstyle hidden -Command “Start-Process cmd -ArgumentList ‘/s,/k,pushd,%V’ -Verb RunAs”
- You need to repeat the above given process again on different Key path.
- Perform above explained steps 3 to 9.
- Now navigate another path
- Perform steps 3 to 9 again.
Now you can check the context menu by right click on background, folder or drive.
If you are not willing to perform this trick by following this lengthy and complex process, you can use another shortcut method as follows.
- Download the zip folder which contains two .reg files. Extract the files and keep them on the desktop. One file is for adding and another for removing “Open command window as administrator” context menu.
- Double click on the specified .reg file to merge it.
- When prompted, click on Run, Yes (UAC), Yes and OK.
Use the convenient method and quickly access Command Prompt (Admin).
Standard Warning: It is recommended not to play with Windows Registry Editor unless or until you are aware of basics of this complex structure. Windows Registry contains all the default settings of the Computer system, so misusing Registry may corrupt your Windows and make your PC unstable. So we don’t suggest a fresher to use Registry editor. If you have some knowledge and you stick to our instructions then there would be no problem but still we recommend you to take a backup of your Windows Registry as well as the data of your PC before starting any of registry editing tricks.