The command prompt is usually activated via the popular “Win + R” key combos. When you press the “Window key + R”, the Run dialog box pops up and you simply type cmd or cmd.exe and the Command Prompt box shows up. Want a quick access? Check out the tutorial below.
How to activate the Administrator Command Prompt in Right-Click Option
Note: we are assuming that you know the nooks and crannies of the Registry Editor and perhaps already have an intermediate or advanced knowledge of adding and editing strings and keys.
On the keyboard, press “Win + R.”
Once you see the box, type regedit in the search box.
The User Account Control may ask you to make changes to the computer. Click “Yes.”
The Registry Editor will be launched. Go to this address: HKEY_CLASSES_ROOT\Directory\shell
Under this folder create a new key and label it “runas.”
Double-click the “runas” folder and check if there’s a “Default” key. Right-click it and choose “Modify.”
Once you click “Modify,” the “Edit String” box shows up. Type “Open Administrator Command Prompt Here” in the Value data box.
Next, in the same folder, create a new string value (right-click the “runas” folder and choose New and select String Value). Label it as “NoWorkingDirectory.”
Your Registry Editor window should look like this (see below).
Under this path, HKEY_CLASSES_ROOT\Directory\shell\runas , create another key and label it as “command.”
Double click the folder and you’ll see the Default string value. Right click and choose “Modify.” Under the Value data, enter cmd.exe /k cd %1 and click OK.
Exit the Registry Editor and reboot your computer. Afterward, open the File Explorer to see the changes.
Accessing Administrator Command Prompt Anywhere in File Explorer
After reboot, launch the File Explorer and right click a file to test the hack.
A successful registry edit will show you a quick access to the Administrator Command Prompt whether you right click a folder or anywhere in the File Explorer.
Note: make sure you have the Administrator rights.
An even faster access to command prompt
If the above method that requires you to edit the registry is not something to your preferences, here is an easier way to open Command Prompt in Windows Explorer. No hacks required, and it works out of the box.
- Open Windows Explorer and navigate to the folder location where you want to open in Command Prompt.
- In the folder address bar, type cmd and press Enter.
The command prompt magically opens in the folder location.
How useful is this hack?
There’s nothing fancy or spectacular about this hack. However, if you want to expand your right-click options in the File Explorer, you can make some edits in the Registry Editor and simply apply the abovementioned steps; instead of launching the Administrator Command Prompt via the keyboard, this shortcut does the trick. Just make sure that you have the Admin rights when you try or apply this hack. Meanwhile, if you know of another way to do this, feel free to drop it in the comments.