I want to have a random wallpaper on my system (XPPro), whenever I
boot up. So, I wrote a Perl script which picks a bmp file at random
and saves it to the file name I chose for my wallpaper. I then put
this script in my startup folder to run at every bootup, so the next
time I boot, I'd get a different picture. My wallaper file I chose is
wallpaper_file.bmp, the script then chooses, say, pic1.bmp and then
saves it as wallpaper_file.bmp.

I guess I was naive about how Windows keeps track of wallpaper. This
simple approach fails. The script works fine, but the system is stuck
on the same picture. I can't even choose the file wallapaer_file.bmp
for wallpaper via Screen Properties. No error, but it ignores the
file.

Can someone tell me what has to be done to change wallpaper via a
program? Doesn't even have to be real time, I'm willing to wait until
the next boot to see the change. Can this be done via a script without
making low level Windows system calls?

Thanks!