en-US security-baseline computer

Remove "Run As Different User" from context menus

Verified with Microsoft Security Baseline (MSS / SecGuide) 25H2 — updated on July 10, 2026

Supported on: At least Windows Vista

Path in the GPO console

Computer Configuration\Administrative Templates\MS Security Guide

Description

This setting controls whether "Run As Different User" appears on the Shift+RightClick context menu for .bat, .cmd, .exe, and .msc files. Enabled (recommended): Keeps "Run As Different User" from appearing in the context menu when the user holds Shift while right-clicking on a .bat, .cmd, .exe, or .msc file in Explorer. Disabled: Restores the Windows default behavior for "Run As Different User."

Registry

HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer

This policy sets several registry values:

NoStartBanner
Enabled: NoStartBanner = 1
Disabled: NoStartBanner = (deleted)
SuppressionPolicy runasuser
Enabled: SuppressionPolicy = 4096
Disabled: SuppressionPolicy = (deleted)
SuppressionPolicy runasuser
Enabled: SuppressionPolicy = 4096
Disabled: SuppressionPolicy = (deleted)
SuppressionPolicy runasuser
Enabled: SuppressionPolicy = 4096
Disabled: SuppressionPolicy = (deleted)
SuppressionPolicy runasuser
Enabled: SuppressionPolicy = 4096
Disabled: SuppressionPolicy = (deleted)

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Remove "Run As Different User" from context menus
; State: Enabled
; Supported on: At least Windows Vista

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoStartBanner"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\runasuser]
"SuppressionPolicy"=dword:00001000

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\runasuser]
"SuppressionPolicy"=dword:00001000

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\runasuser]
"SuppressionPolicy"=dword:00001000

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mscfile\shell\runasuser]
"SuppressionPolicy"=dword:00001000
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Remove "Run As Different User" from context menus
# State: Enabled
# Supported on: At least Windows Vista

$path = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'NoStartBanner' -Value 1 -Type DWord

$path = 'HKLM:\SOFTWARE\Classes\batfile\shell\runasuser'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SuppressionPolicy' -Value 4096 -Type DWord

$path = 'HKLM:\SOFTWARE\Classes\cmdfile\shell\runasuser'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SuppressionPolicy' -Value 4096 -Type DWord

$path = 'HKLM:\SOFTWARE\Classes\exefile\shell\runasuser'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SuppressionPolicy' -Value 4096 -Type DWord

$path = 'HKLM:\SOFTWARE\Classes\mscfile\shell\runasuser'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'SuppressionPolicy' -Value 4096 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview