Link to home
Start Free TrialLog in
Avatar of Dennis_Sullivan
Dennis_Sullivan

asked on

remotely changing wallpaper with a script

I have a few problem users who are changing their corporate standard wallpaper thru windows picture and fax viewer.  I found a way to disable their ability to do this.  I want to change their wallpaper back to the corp standard by using the script listed below.  I tried to run it via pstools. The process starts but but it won't change the wallpaper.  If I log in as a standard user (no admin rights to PC) and run this as a .bat file it changes the wallpaper.  I think that when I use PStools to run this (using my credentials) it tries to change it under my profile. I've tried PC based group policy and that only works for new users logging into the PC. It does not force the wallpaper back to the corp standard for users who changed it. Is there a way to make this work for the user currently logged in or for users who already have profiles?
@echo off
call :quiet>nul 2>&1
goto :EOF
:quiet
:: Configure Wallpaper 
REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "%SystemRoot%\User Desktop v2.0.bmp"
REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 0
REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 2
:: Make the changes effective immediately
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters

Open in new window

Avatar of igor-1965
igor-1965
Flag of Czechia image

If you have Active Directory then GPO is the way to go: http://www.microsoft.com/windowsserver2003/gpmc/default.mspx

User Configuration | Administrative Templates | Desktop/Active Desktop |
Active Desktop Wallpaper Enabled
Wallpaper Name: c:\windows\system32\<YOUR_WALLPAPER_NAME_1024x768.bmp
Wallpaper Style: Stretch
Avatar of Dennis_Sullivan
Dennis_Sullivan

ASKER

This is only for about 8 users and I would like to avoid using a GPO if possible. Too much of a hassel with IT management.  I am really trying to figure out how to get the script to work. Thanks for the post.
ASKER CERTIFIED SOLUTION
Avatar of igor-1965
igor-1965
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial