NetToken
asked on
Need command to refresh wallpaper after it's been changed in registry...
I looking for a text command that will let me refresh the Windows wallpaper in Server 2008 R2 after it has been changed in the registry via a text command.
I've come up with the following two commands which change the Windows wallpaper...
reg add "HKCU\Software\Microsoft\I nternet Explorer\Desktop\General" /v
Wallpaper /d "C:\BatchFiles\background. bmp" /f
reg add "HKCU\Software\Microsoft\I nternet Explorer\Desktop\General" /v
Wallpapersource /d "C:\BatchFiles\background. bmp" /f
The next command works on Windows XP for refreshing the screen after the desktop wallpaper has been changed using a similar (reg add) command...
RUNDLL32.EXE USER32.DLL,UpdatePerUserSy stemParame ters ,1 ,True
Unfortunately, that command doesn't work in Server 2008 R2.
I've found that even logging off & back onto the server doesn't update the wallpaper change. However, by simply going into "Control Panel\All Control Panel Items\Display\Desktop Background" will immediately effect the wallpaper change.
I'm doing this for a project at work so any assistance is greatly appreciated.
I've come up with the following two commands which change the Windows wallpaper...
reg add "HKCU\Software\Microsoft\I
Wallpaper /d "C:\BatchFiles\background.
reg add "HKCU\Software\Microsoft\I
Wallpapersource /d "C:\BatchFiles\background.
The next command works on Windows XP for refreshing the screen after the desktop wallpaper has been changed using a similar (reg add) command...
RUNDLL32.EXE USER32.DLL,UpdatePerUserSy
Unfortunately, that command doesn't work in Server 2008 R2.
I've found that even logging off & back onto the server doesn't update the wallpaper change. However, by simply going into "Control Panel\All Control Panel Items\Display\Desktop Background" will immediately effect the wallpaper change.
I'm doing this for a project at work so any assistance is greatly appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try this DOS command:
control.exe desk.cpl,@0,0
I tried changing my background with
reg add "HKCU\Software\Microsoft\I nternet Explorer\Desktop\General" /v WallpaperSource /d C:\107.jpg /f
and it didn't change. Then I tried the location below
reg add "HKCU\Control Panel\Desktop" /v Wallpaper /d C:\107.jpg /f
in Windows 7 and then I hit F5 to refresh and it was there.
reg add "HKCU\Software\Microsoft\I
and it didn't change. Then I tried the location below
reg add "HKCU\Control Panel\Desktop" /v Wallpaper /d C:\107.jpg /f
in Windows 7 and then I hit F5 to refresh and it was there.
ASKER
I tried the "control.exe desk.cpl,@0,0" on the Windows 2008 R2 server and it returned the destop icon selections which didn't update the wallpaper. I ran the command with all the other .CPL's in the SYSTEM32 folder. It returned some interesting screens; like the network adapters panel.
I believe you were correct that this problem may require a procedure call to an external utility. That makes this a programming question, best asked in another zone:
I'm going to give this one to sjklein42 for pointing me in the right direction.
Thanks for the assist rrjmin0, I tried your Windows 7 solution but unfortunately doing the same thing doesn't work on Server 2008 R2.
I believe you were correct that this problem may require a procedure call to an external utility. That makes this a programming question, best asked in another zone:
I'm going to give this one to sjklein42 for pointing me in the right direction.
Thanks for the assist rrjmin0, I tried your Windows 7 solution but unfortunately doing the same thing doesn't work on Server 2008 R2.
Thats cool and good luck with your future endeavors :)
You can experiment changing the second 0 to another number (ie 1-5) to bring up the other tabs in the control panel. The tab numbers appear to be different depending on the version of Windows.
control.exe desk.cpl,@0,1
ASKER
I've got everything in the batch file working perfectly on Windows XP clients, but so far solving this problem on a Terminal server running Windows 2008 R2 64bit has me stumped.
Does someone here know how to code a command to launch the desktop wallpaper selection screen?