Elevated Command Prompt Shortcut

How to Create an "Elevated Command Prompt" Shortcut in Windows 7 and Windows 8

   Information
This tutorial will show you how to create a shortcut that will open an elevated command prompt with administrator rights in Windows 7 and Windows 8.

   Note
When you use the elevated command prompt shortcut, you may be prompted to click/tap on Yes or enter the administrator account's password depending on your UAC settings in Windows 7 or Windows 8.

   Warning
You must be logged in as an administrator to be able to use this shortcut.


EXAMPLE: Elevated Command Prompt
NOTE: Notice how the elevated command prompt opens to C:\Windows\System32 and not C:\Users\(user name) as the default command prompt without administrator rights.
Elevated_Command_Prompt.jpg




OPTION ONE

To Download an "Elevated Command Prompt" Shortcut


1. Click/tap on the Download button below to download the file below.
Elevated_Command_Prompt.zip

Download


2. Save the ZIP file to your desktop.

3. Open the zip file, and extract (drag and drop) the Elevated Command Prompt shortcut to your desktop.

4. Unblock the Elevated Command Prompt shortcut.
NOTE: If there is not a Unblock button there, then the shortcut is already unblocked. Continue on to step 7.

5. In Windows 7, you can now Pin to Taskbar or Pin to Start Menu, add to Quick Launch, assign a keyboard shortcut to it, or move this shortcut to where you like for easy use.

6. In Windows 8 and 8.1, you can Pin to Taskbar on desktop, Pin to Start screen, add to Quick Launch, assign a keyboard shortcut to it, or move this shortcut to where you like for easy use.

7. When finished, you can delete the downloaded zip file if you like.







OPTION TWO

To Manually Create an "Elevated Command Prompt" Shortcut


1. Right click or press and hold on an empty space on your desktop, and click/tap on New and Shortcut.

2. Copy and paste either location below into the location area, and click/tap on Next. (see screenshot below)
%ComSpec%

OR

%windir%\System32\cmd.exe


Step1.jpg

3. Type in the name Elevated Command Prompt, and click/tap on Finish. (see screenshot below)
NOTE: You can type in any name that you would like to use for the shortcut though.
Step2.jpg
4. Right click or press and hold on the Elevated Command Prompt shortcut, and click/tap on Properties.

5. Click/tap on the Shortcut tab, and click/tap on the Advanced button. (see screenshot below).
Properties.jpg
6. Check the Run as administrator box, and click/tap on OK. (See screenshot below)
Advanced.jpg
7. Click/tap on OK. (see screenshot below step 5)

8. In Windows 7, you can now Pin to Taskbar or Pin to Start Menu, add to Quick Launch, assign a keyboard shortcut to it, or move this shortcut to where you like for easy use.

9. In Windows 8 and 8.1, you can Pin to Taskbar on desktop, Pin to Start screen, add to Quick Launch, assign a keyboard shortcut to it, or move this shortcut to where you like for easy use.
That's it,
Shawn



 

Attachments

Last edited:
Thank you Brink for another excellent tutorial. :)

warnsmall.png
Warning
You must be logged in as an administrator to be able to use this shortcut.

As the :devil:'s advocate ...
With an elevated cmd-prompt shortcut , ie "Run as Administrator" ... why would I need to be logged in as Admin to use the shortcut. ?

Without having experimented with an elevated shortcut, what is the point of an elevated shortcut if it can only be used when logged in as administrator.
If logged in as admin, wouldn't opening the cmd.exe default to Administrator.

I would like to open an elevated cmd-prompt from my user account using the elevated shortcut.

Sorry to be difficult ... I am not questioning the human logic ... but the OS/security logic.

---------------
SPECS:
Toshiba Satellite C665
OS:= Windows 7 Home Premium (32-bit), sp1 (Build 7601) OEM
UI:=Classic Shell Start + Classic Explorer
Windows Indexing = disabled
Security settings for C:\
System ... (full control:=ON)
Administrators (Owner-PC\Administrators) ... (full control:=OFF)
Users (Owner-PC\Users) ... (full control:=OFF)

No problem. Here's why. :)

Nope. An administrator account is not an elevated account like the built-in elevated "Administrator" account. An administrator account behaves the same way as a standard user until you want to run something elevated (Run as administrator).

If you are logged in to an administrator account and "Run as Administrator", you will be prompted by UAC to click on Yes/No to approve by default.

If you are logged in to a standard user account and "Run as Administrator", you will be prompted by UAC to enter an administrator's password to approve by default.

Thus, either way, you must be logged in as an administrator to "Run as Administrator".

If you like, you could also use the method in the tutorial below to run an elevated command prompt in a standard user account without being prompted by UAC.
http://www.sevenforums.com/tutorials/193743-elevated-program-shortcut-create-standard-user.html
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
I would like to open an elevated cmd-prompt from my user account using the elevated shortcut.
Have you tried creating the shortcut for the elevated cmd and then either leaving it on your desktop or pinning it to your taskbar?

There are several options to do that here: http://www.sevenforums.com/tutorials/182161-shortcut-create-file-folder-drive-program-windows.html The one way you may be comfortable with is Option Four.

  • Copy/type/paste this C:\Windows\System32\cmd.exe into the Location box in step #2.

  • It will skip step #'s 3 and 4, and go directly to step #5 where you can give your new shortcut a name that suits you.

  • Click on Finish and see your new shortcut on your desktop.

  • You can either leave it on the desktop or right click it to open the context menu, where you can pin it to the Taskbar or the Start Menu.
Depending on how you have your User Account Control set you will still have to OK it unless you have it set to Never Notify which is dangerous to do.


After creating the first part of this post I saw this which might be better: http://www.sevenforums.com/tutorials/11949-elevated-program-shortcut-without-uac-prompt-create.html
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Gateway DX4831-01e (Mid-Tower Desktop)
OS
Originally Win 7 Hm Prem x64 Ver 6.1.7600 Build 7601-SP1 | Upgraded to Windows 10 December 14, 2019
CPU
Intel i3 530 2.93GHz, 2933MHz 2 Cores 4 Logical Processors
Motherboard
Gateway H57M01 133 megahertz
Memory
6GB of 1,333MHz DDR3 SDRAM
Graphics Card(s)
32MB Intel Graphics Media Accelerator HD IGChip
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
Gateway HX2000 20inch TFT active matrix TN
Screen Resolution
1600 x 900 x 59 hertz
Hard Drives
WDC WD10EADS-00M2B0 [HDD] (1000.20 GB) -- drive 0,
HL-DT-ST DVDRAM GH41N [CD-ROM dr]
Four card readers, and Four USB 2.0
PSU
300watts.
Case
Mid-Tower Desktop
Cooling
Stock from Gateway
Keyboard
Natural Ergonomic Keyboard 4000, see Other Info
Mouse
Orig. Gateway wore out now using Insignia USB wired optical
Internet Speed
Vz FIOS 10ms png 57.64Mbps down 65.53Mbps up Speedtest.org
Antivirus
Zamana Anti-logger with Anti-malware, MSE, Windows Firewall,
Browser
IE11.0.9600.19399-Upd ver11.0.135, Firefox 68.0.1 x64
Other Info
System Specs by Belarc.

BIOS: American Megatrends Inc. P01-A0 11/17/2009

Replaced the MS 'Natural' Standard PS/2 Enhanced 101-102 Keyboard with a new Natural Ergonomic Keyboard 4000 on August 1st 2014.

Canon Pixma MG3222 Printer.

Updated to IE11 on 12102015 | Fios Quantum Router g1100

Additional AV: SpywareBlaster, manual Mbam, SAS
Referring to Option 2, Step 2, it may be shorter and nicer looking to use the %ComSpec% system environment variable over %windir%\System32\cmd.exe as the target.
 

My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
Referring to Option 2, Step 2, it may be shorter and nicer looking to use the %ComSpec% system environment variable over %windir%\System32\cmd.exe as the target.

Thank you. I added it to step 2 in Option 2 as another choice. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
thank you
i have it pinned to the start menu and it opens fine after the user account control
do you want the following program to make changes to this computer?
i click yes and there it is.
 

My Computer

Computer type
PC/Desktop
OS
win7 pro
not sure it safe but it is functionning

Hi,

Looking at some explanations in internet and on your forum, i found a manner to launch via a shortcut launching a CMD file directly open a command prompt as elevated admin user but not at the begin.
Simple: i'm not admin but know the admin because, i'm the same person on my computer.
And for some tasks i have to be the admin in the cmd-prompt and want to do it very quickly without entering the password.

Solution i found is using a cmd file where i'm using psexec command and powershell command.
Create the file like "elevated-Comand.cmd"
Containing only the following line:
"[DIR where you installed psexec from pstools]psexec.exe" -user [domain|workgroup]\[user_with_admin_rights] -p [password_in_clear] -nobanner -accepteula "powershell" "start cmd -v runas"
And it is it.
You get a Command prompt with admin rights and for example type the following command :
net session

In case you're in an unelevated user rights command prompt your result should be something like:
Access denied
 

My Computers

System One System Two

  • Computer type
    Laptop
    Computer Manufacturer/Model Number
    MSI
    OS
    Windows 10 Professional 64bit
    CPU
    iCore7 i7-7700HQ CPU @2.8GHZ
    Motherboard
    Micro-star international ms-17A1 REV:1.0
    Memory
    16Gb
    Graphics Card(s)
    Nvidia Geforce GTX 1070
    Antivirus
    norton gamer 360
    Browser
    firefox opera gamer
  • Computer type
    PC/Desktop
Back
Top