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


  • Staff
RunAsAdmin_banner.png

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.

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.


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: 150
  • Remove_Run_as_administrator_from_context_menu.reg
    866 bytes · Views: 182
Last edited:
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
    Win-7-10-11Pro's
    Computer type
    PC/Desktop
    Manufacturer/Model
    Acer 17" Nitro 7840sn/ 2x16gb 5600c40/ 4060/ stock 1tb-os/ 4tb sn850x
    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
    2-WD-sn850x 4tb/ 970evo+500gb/ 980 pro 2tb.
    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
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
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    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,
    4TB Samsung 990 PRO M.2,
    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,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
thank you very much
 

My Computer

System One

  • OS
    window 11 home
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Inc.
    Motherboard
    Enhanced (101 - or 102-key)

Latest Support Threads

Back
Top Bottom