Thursday, March 20, 2014

Window 7 Desktop Picture via .bat script

I have a case when I wanted to set my desktop background at startup via a bat script.

put a wallpaper.jpg picture that you want on your desktop somewhere.

Create a [whatever].bat file in a location,


reg add "HKCU\Control Panel\Desktop" /v Wallpaper /f /t REG_SZ /d C:\path\to\wallpaper.jpg

RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True

You could run the .bat now if you want.
To have it apply each time you restart, put a shortcut to the .bat file C:\Users\[your account name]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

No comments:

Post a Comment