Accounts Add or Remove Run as administrator Context Menu in Windows 11


  • Staff
RunAsAdmin_banner.png

Windows runs desktops apps and application files (ex: .bat, .cmd, .exe, and .msc file types) in user mode by default without elevated administrator rights unless it prompts you with UAC to run elevated (highest privileges).

When you use Run as administrator on a desktop app or application file, you are allowing it to run with full administrator access to everything on the computer. This means you are giving it special permissions to access restricted parts of the computer that would otherwise be off-limits. This could be a potential security risk if not a trusted app or application file, but sometimes "Run as administrator" is necessary for a trusted app or application file to run properly if it requires elevated rights for full access.

This tutorial will show you how to add or remove the Run as administrator context menu item for all users in Windows 10 and Windows 11.


You must be signed in as an administrator to add or remove the Run as administrator context menu.

This will not remove the Run as administrator context menu in the Start menu. Instead it will only enable or disable the Run as administrator context menu from working in the Start menu.



EXAMPLE: "Run as administrator" context menu

Run_as_administrator_context_menu-1.png
Run_as_administrator_context_menu-2.png



Here's How:

1 Do step 2 (add) or step 3 (remove) below for what you would like to do.

2 Add Run as administrator to Context Menu

This is the default setting


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Add_Run_as_administrator_to_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\batfile\shell\runas]

[HKEY_CLASSES_ROOT\batfile\shell\runas]
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\batfile\shell\runas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6d,00,\
  64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,43,00,20,00,22,00,25,00,31,00,22,\
  00,20,00,25,00,2a,00,00,00


[-HKEY_CLASSES_ROOT\cmdfile\shell\runas]

[HKEY_CLASSES_ROOT\cmdfile\shell\runas]
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6d,00,\
  64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,43,00,20,00,22,00,25,00,31,00,22,\
  00,20,00,25,00,2a,00,00,00


[-HKEY_CLASSES_ROOT\cplfile\shell\runas]

[HKEY_CLASSES_ROOT\cplfile\shell\runas]
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\cplfile\shell\runas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
  6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,73,00,68,\
  00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,43,00,6f,00,\
  6e,00,74,00,72,00,6f,00,6c,00,5f,00,52,00,75,00,6e,00,44,00,4c,00,4c,00,41,\
  00,73,00,55,00,73,00,65,00,72,00,20,00,22,00,25,00,31,00,22,00,2c,00,25,00,\
  2a,00,00,00


[-HKEY_CLASSES_ROOT\exefile\shell\runas]

[HKEY_CLASSES_ROOT\exefile\shell\runas]
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\exefile\shell\runas\command]
@="\"%1\" %*"
"IsolatedCommand"="\"%1\" %*"


[-HKEY_CLASSES_ROOT\mscfile\shell\RunAs]

[HKEY_CLASSES_ROOT\mscfile\shell\RunAs]
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\mscfile\shell\RunAs\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,\
  63,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,\
  00,00,00

3 Remove Run as administrator from Context Menu

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Remove_Run_as_administrator_from_context_menu.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\batfile\shell\runas]

[-HKEY_CLASSES_ROOT\cmdfile\shell\runas]

[-HKEY_CLASSES_ROOT\cplfile\shell\runas]

[-HKEY_CLASSES_ROOT\exefile\shell\runas]

[-HKEY_CLASSES_ROOT\mscfile\shell\RunAs]

4 Save the REG file to your desktop.

5 Double click/tap on the downloaded REG file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 You can now delete the downloaded REG file if you like.


That's it,
Shawn Brink


 

Attachments

  • Add_Run_as_administrator_to_context_menu.reg
    4.6 KB · Views: 28
  • Remove_Run_as_administrator_from_context_menu.reg
    866 bytes · Views: 25
  • RunAsAdmin.png
    RunAsAdmin.png
    2.2 KB · Views: 15
Last edited:

ThrashZone

Minor Threat
Power User
VIP
Local time
12:40 PM
Posts
1,292
Visit site
OS
Linux-Mint-Cinnamon-20.2 Win-7-10-11Pro's
Hi,
So what's wrong with the older run as admin to context menu, that made you make a new tutorial ?
22h2 screw it up or something last I checked it still existed on my context menu :/
 

My Computer

System One

  • OS
    Linux-Mint-Cinnamon-20.2 Win-7-10-11Pro's
    Computer type
    PC/Desktop
    Manufacturer/Model
    asus x3
    CPU
    10900k & 9940x & 5930k
    Motherboard
    z490-Apex & x299-Apex & x99-Sabertooth
    Memory
    Trident-Z Royal 4000c16 2x16gb & Trident-Z 3600c16 4x8gb & 3200c14 4x8gb
    Graphics Card(s)
    Titan Xp & 1080ti FTW3 & evga 980ti gaming
    Sound Card
    Onboard Realtek x3
    Monitor(s) Displays
    1-AOC G2460PG 24"G-Sync 144Hz/ 2nd 1-ASUS VG248QE 24"/ 3rd LG 43" series
    Screen Resolution
    1920-1080 not sure what the t.v is besides 43" class scales from 1920-1080 perfectly
    Hard Drives
    To many to list
    PSU
    1000p2 & 1200p2 & 850p2
    Case
    D450 x2 & 1 Test bench in cherry Entertainment center
    Cooling
    Custom water loops x3 with 2x mora 360mm rads only 980ti gaming air cooled
    Keyboard
    G710+x3
    Mouse
    Redragon x3
    Internet Speed
    xfinity gigabyte
    Browser
    Firefox
    Antivirus
    mbam pro

Brink

Administrator
Staff member
MVP
Thread Starter
Local time
12:40 PM
Posts
7,581
Visit site
OS
Windows 11 Pro for Workstations
Hi,
So what's wrong with the older run as admin to context menu, that made you make a new tutorial ?
22h2 screw it up or something last I checked it still existed on my context menu :/

Hello mate, :-)

Nothing has changed.

The tutorial was made to have a choice in case someone wants to remove it, or restore it if removed by something.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    16 GB (8GBx2) G.SKILL TridentZ DDR4 3200 MHz
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    1TB Samsung 980 PRO M.2,
    6TB WD Black WD6001FZWX
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    Linksys EA9500 router,
    Motorola MB8611 cable modem,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S20 Ultra 5G phone
  • Operating System
    Windows 11 Pro for Workstations
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1
    CPU
    i7-1065G7 3.9 GHz
    Memory
    16 GB LPDDR4-3200
    Graphics card(s)
    Intel Iris Plus
    Sound Card
    Intel SST
    Monitor(s) Displays
    13.3" 4K UWVA AMOLED multitouch
    Screen Resolution
    3840 x 2160
    Hard Drives
    512 GB PCIe NVMe M.2 SSD
    Browser
    Google Chrome
    Antivirus
    Windows Defender and Malwarebytes Premium

Latest Support Threads

Top Bottom