Open in the explorer

Remove File Explorer's default context menu

Supprimer le menu contextuel par défaut de l’Explorateur de fichiers

Type
User
GPO path
User Configuration › Policies › Administrative Templates › Windows Components › File Explorer FR: Configuration utilisateur › Stratégies › Modèles d'administration › Composants Windows › Explorateur de fichiers
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
WindowsExplorer.admx
Internal name
WindowsExplorer/NoViewContextMenu

Explanation

Removes shortcut menus from the desktop and File Explorer. Shortcut menus appear when you right-click an item.

If you enable this setting, menus do not appear when you right-click the desktop or when you right-click the items in File Explorer. This setting does not prevent users from using other methods to issue commands available on the shortcut menus.

French text from Windows 11 26H2

Supprime les menus contextuels du Bureau et de l’Explorateur de fichiers. Les menus contextuels apparaissent lorsque vous cliquez avec le bouton droit sur un élément.

Si vous activez ce paramètre, les menus n’apparaîtront plus lorsque vous cliquerez avec le bouton droit sur le Bureau ou sur les éléments de l’Explorateur de fichiers. Ce paramètre n’empêche pas les utilisateurs d’employer d’autres méthodes pour appeler les commandes disponibles dans les menus contextuels.

Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value name
NoViewContextMenu
StateValue written
Enablednot defined in the ADMX
Disablednot defined in the ADMX

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

The ADMX does not specify the value written when enabled; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled). The commands below use 1/0 as an assumption.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: WindowsExplorer/NoViewContextMenu
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'NoViewContextMenu' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: WindowsExplorer/NoViewContextMenu
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# The ADMX does not specify the value written; the GPO editor usually writes REG_DWORD 1 (enabled) / 0 (disabled)
Set-ItemProperty -Path $k -Name 'NoViewContextMenu' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": WindowsExplorer/NoViewContextMenu
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'NoViewContextMenu' -ErrorAction SilentlyContinue

Availability