How to Programmatically Change Desktop Background Color in Windows Server 2012 RDSH via Registry and GPO


2 views

In Windows Server 2012 RDSH environments with Desktop Experience enabled, administrators often face difficulties when users request custom desktop background colors. The classic "Advanced Appearance Settings" dialog was removed in the Windows 8/Server 2012 architecture shift, leaving a gap in personalization options.

The most reliable method involves modifying the following registry key:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Colors]
"Background"="0 78 152"  // Navy blue example (RGB values)

For system-wide deployment on RDSH servers, use this PowerShell script:

$regPath = "HKCU:\Control Panel\Colors"
$colorValue = "58 110 165" # Sample light blue
Set-ItemProperty -Path $regPath -Name "Background" -Value $colorValue

For enterprise environments, create a Group Policy Preference:

  1. Open Group Policy Management Console
  2. Navigate to: User Configuration > Preferences > Windows Settings > Registry
  3. Add new registry item with these parameters:
    Action: Update
    Hive: HKEY_CURRENT_USER
    Key Path: Control Panel\Colors
    Value name: Background
    Value type: REG_SZ
    Value data: [Your RGB values separated by spaces]
    

After making changes, users need to either log off/log on or restart explorer.exe:

taskkill /f /im explorer.exe
start explorer.exe
  • The RGB values must be space-delimited (not commas)
  • Changes won't reflect until explorer refreshes
  • Test in non-production first as some RDSH configurations may override these settings
  • For multi-user environments, consider implementing through logon scripts

If the color doesn't change:

# Check effective registry value:
Get-ItemProperty -Path "HKCU:\Control Panel\Colors" -Name "Background"

# Verify no conflicting GPOs:
gpresult /h gpreport.html

When Microsoft removed the classic "Advanced Appearance Settings" dialog in Windows 8/Server 2012, they didn't provide a direct GUI replacement for desktop background color customization - especially problematic in Remote Desktop Session Host (RDSH) environments where users expect personalization.

The active desktop color is controlled by these registry values:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Colors]
"Background"="0 78 152"  ; RGB values space-delimited

For system-wide deployment on RDSH servers:

[HKEY_USERS\.DEFAULT\Control Panel\Colors]
"Background"="0 78 152"

For automated deployment across multiple servers:

$colorValue = "0 78 152"
$registryPath = "HKCU:\Control Panel\Colors"
Set-ItemProperty -Path $registryPath -Name "Background" -Value $colorValue

Create a Group Policy Preference (GPP) registry item targeting:

Path: HKEY_CURRENT_USER\Control Panel\Colors
Value name: Background
Value type: REG_SZ
Value data: [Your RGB values]