Skip to content
David Cumps
Random Wallpaper through Scheduled Tasks

Random Wallpaper through Scheduled Tasks

Originally published on my old blog at cumps.be on September 1, 2004.

With my new laptop I got a screen with a 1920x1200 resolution, so I went out looking for wallpapers for the resolution, because my existing ones degraded in quality with that size.

My search led to Deaddreamer from which I have my current wallpaper as well.

But nowadays he has so many good ones that I picked five 1600x1200 wallpapers. And now I want a random wallpaper each time I log on.

Having some spare time (very rare) I created something small myself, I’m sure there are tools out there to do all that.

Originally I wanted to use PHP to get a random number and set the wallpaper, and then call the PHP script from a batch file and set it as a scheduled task. But that kept popping up a DOS prompt each time it set it, and my wallpaper disappeared after boot (some bad registry settings).

So I used KiXtart to set the wallpaper and then link it with a shortcut which would run minimized.

That worked for one paper, but when I tried the RAND function in KiXtart, it didn’t go well… But I had the PHP script and batch file still there so I let that make a random number and then call the KiX script with that number as argument.

Result: Shortcut to wall.bat, which calls wall.php, which makes a random number and calls wallpaper.kix with the number, after which my wallpaper is set, and saved in registry.

I set the shortcut to run minimized, at logon and every hour, and now I got a nice random wallpaper implementation.

Overly complicated? Maybe. If you have PHP installed, it’s a small solution, otherwise you need a 1.3 MB DLL and a 24 KB php.exe in the same dir, which isn’t really something bad.

I have zipped everything and written the steps to install it out in a Readme.txt for everyone wanting it as well. I also included the php.exe and DLL.

Download it here: RandomWall.zip (706 KB).

And now I have sweeeet super-detailed wallpapers auto-changing without any special timer programs running, but just the Scheduled Tasks :)

Here are my wallpapers:

Convert them to .bmp first; I’m not sure it’s required, but BMP is nicer, since the desktop doesn’t need to go into Web mode.

You May Also Like