Allow only per user or approved shell extensions
N’autoriser que les extensions de l’environnement par utilisateur ou approuvées
Explanation
This setting is designed to ensure that shell extensions can operate on a per-user basis. If you enable this setting, Windows is directed to only run those shell extensions that have either been approved by an administrator or that will not impact other users of the machine.
A shell extension only runs if there is an entry in at least one of the following locations in registry.
For shell extensions that have been approved by the administrator and are available to all users of the computer, there must be an entry at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved.
For shell extensions to run on a per-user basis, there must be an entry at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved.
Ce paramètre est destiné à s’assurer que les extensions de l’environnement peuvent être appliquées à un utilisateur donné. Si vous activez ce paramètre, Windows n’exécutera que les extensions de l’environnement qui ont été approuvées par un administrateur ou qui n’ont pas d’impact sur les autres utilisateurs de l’ordinateur.
Une extension de l’environnement ne s’exécute que si une entrée figure dans au moins un des emplacements du Registre suivants.
Pour les extensions de l’environnement qui ont été approuvées par l’administrateur et qui sont disponibles pour tous les utilisateurs de l’ordinateur, une entrée doit figurer dans HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved.
Pour les extensions de l’environnement s’exécutant pour un utilisateur donné, une entrée doit figurer dans HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved.
Registry
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer- Value name
EnforceShellExtensionSecurity
| State | Value written |
|---|---|
| Enabled | not defined in the ADMX |
| Disabled | not 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/EnforceShellExtensionSecurity
$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 'EnforceShellExtensionSecurity' -Value 1 -Type DWord # assumed value (not defined in the ADMX)Disable
# Disable: WindowsExplorer/EnforceShellExtensionSecurity
$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 'EnforceShellExtensionSecurity' -Value 0 -Type DWord # assumed value (not defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": WindowsExplorer/EnforceShellExtensionSecurity
$k = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer'
Remove-ItemProperty -Path $k -Name 'EnforceShellExtensionSecurity' -ErrorAction SilentlyContinue