We help IT Professionals succeed at work.

Login Script to change desktop background

Dear all,

I want to create a login script to change the background image to a image found on a remote drive, is this possible?

It's going to be used more as a backup method for when GP fails in W2K3.


Lyon J Till
Watch Question

ITIL Problem Manager
See the batch file below:
@echo off
call :quiet>nul 2>&1
goto :EOF
:: Configure Wallpaper 
REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "complete path of file ending in .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 1
:: Remove the user's ability to see the background tab of Display Properties. 
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /V NoDispBackgroundPage /T REG_DWORD /F /D 1
:: Make the changes effective immediately
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters

Open in new window


Does it have to be a .bmp file or can it be a jpeg?


Justin OwensITIL Problem Manager

With XP, it must be a BMP.  When you set another file type, Windows creates a BMP which it actualy uses to display.
Justin OwensITIL Problem Manager

You can always use Windows Paint (or almost any other Graphics program) to convert the jpeg to bmp.