I use address bar of File explorer to open command prompt in current directory(By typing cmd in address bar). It will open the command prompt as Administrator. I have used Windows 7 OS and I logged in as Domain Administrator.
Now I upgraded the OS to Windows 10. Now I am doing the same, But command prompt is not opened as Administrator.(For local Administrator account it was fine). Is there any way to get command prompt as Administrator(Opening from Address bar) ?
We can add this windows default shortcut for achieving cmd as Administrator in single click
Unfortunately a recent Windows 10 Update has removed the Open command prompt mentioned by @Arvindharaj. However, if you feel comfortable editing the Windows Registry then this site that explains how to activate admin cmd right-click option might be a great option. It was for me.
Here are basic steps after launching regedit.exe
:
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
.
Under the HKEY_CLASSES_ROOT\Directory\shell\runas
path, 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.
FYI - I think this last step is wrong btw. The cmd prompt will launch as admin but in its default folder. So instead enter "cmd.exe /s /k pushd %V" and this should launch the admin prompt in the folder you right-clicked on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With