Open in the explorer

Remove access to the context menus for the taskbar

Supprimer l’accès aux menus contextuels pour la barre des tâches

Type
Computer and user
GPO path
Computer Configuration › Policies › Administrative Templates › Start Menu and Taskbar User Configuration › Policies › Administrative Templates › Start Menu and Taskbar FR: Configuration ordinateur › Stratégies › Modèles d'administration › Menu Démarrer et barre des tâchesFR: Configuration utilisateur › Stratégies › Modèles d'administration › Menu Démarrer et barre des tâches
Supported on
At least Windows 2000 FR: Au minimum Windows 2000
ADMX file
StartMenu.admx
Internal name
StartMenu/NoTrayContextMenu

Explanation

This policy setting allows you to remove access to the context menus for the taskbar.

If you enable this policy setting, the menus that appear when you right-click the taskbar and items on the taskbar are hidden, such as the Start button, the clock, and the taskbar buttons.

If you disable or do not configure this policy setting, the context menus for the taskbar are available.

This policy setting does not prevent users from using other methods to issue the commands that appear on these menus.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de supprimer l’accès aux menus contextuels pour la barre des tâches.

Si vous activez ce paramètre de stratégie, les menus qui s’affichent lorsque vous cliquez avec le bouton droit sur la barre des tâches et les éléments de la barre des tâches sont masqués, tels que le bouton Démarrer, l’horloge et les boutons de la barre des tâches.

Si vous désactivez ce paramètre de stratégie ou si vous ne le configurez pas, les menus contextuels pour la barre des tâches sont disponibles.

Ce paramètre de stratégie n’empêche pas les utilisateurs d’utiliser d’autres méthodes pour émettre les commandes qui s’affichent dans ces menus.

Registry

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Value name
NoTrayContextMenu
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.

Computer (HKLM)

Enable

# Enable: StartMenu/NoTrayContextMenu
$k = 'HKLM:\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 'NoTrayContextMenu' -Value 1 -Type DWord  # assumed value (not defined in the ADMX)

Disable

# Disable: StartMenu/NoTrayContextMenu
$k = 'HKLM:\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 'NoTrayContextMenu' -Value 0 -Type DWord  # assumed value (not defined in the ADMX)

Revert to "Not configured"

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

User (HKCU)

Enable

Disable

Revert to "Not configured"

Availability