Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch file to test and change wallpaper... what am i doing wrong?!?  (Read 2018 times)

0 Members and 1 Guest are viewing this topic.

samdolph

  • Guest
Hi, we'd like to write a batch to see what wallpaper our users are currently using, and if it is our old pre-defined wallpaper, we'd like to push an update pointer to a new file containing our new logo, if the background is set to anything other than our old pre-defined logo we'd like to leave it as is,  because it is likely a background that our users have set and would like to keep. I have had no problem writing the portion that changes the wallpaper, but I cannot get the syntax to test what the current wallpaper is set to. Here is the code which I have gotten so far:

@echo off
cls
call :quiet>nul 2>&1
::quiet

REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\filename.bmp"
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters

This simply sets the background to c:\filename.bmp but does not test to see what the bg currently is, any and all help would be appreciated.
Thanks!