Do not allow color changes
Ne pas autoriser les modifications de couleur
Explanation
This policy setting controls the ability to change the color of window frames.
If you enable this policy setting, you prevent users from changing the default window frame color.
If you disable or do not configure this policy setting, you allow users to change the default window frame color.
Note: This policy setting can be used in conjunction with the "Specify a default color for window frames" policy setting, to enforce a specific color for window frames that cannot be changed by users.
Ce paramètre de stratégie contrôle la possibilité de modifier la couleur des cadres de fenêtres.
Si vous activez ce paramètre de stratégie, vous empêchez les utilisateurs de modifier la couleur par défaut des cadres de fenêtres.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, vous permettez aux utilisateurs de modifier la couleur par défaut des cadres de fenêtres.
Remarque : ce paramètre de stratégie peut être utilisé avec le paramètre « Spécifier une couleur par défaut pour les cadres de fenêtres », pour imposer une couleur spécifique des cadres de fenêtres ne pouvant pas être modifiée par les utilisateurs.
Registry
HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\DWM- Value name
DisallowColorizationColorChanges
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
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: DWM/DwmDisallowColorizationColorChanges_1
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\DWM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisallowColorizationColorChanges' -Value 1 -Type DWordDisable
# Disable: DWM/DwmDisallowColorizationColorChanges_1
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\DWM'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisallowColorizationColorChanges' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": DWM/DwmDisallowColorizationColorChanges_1
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\DWM'
Remove-ItemProperty -Path $k -Name 'DisallowColorizationColorChanges' -ErrorAction SilentlyContinue