I'm trying to discover a way to use a script (batch file commands) to set a .jpg image as the wallpaper for a new user account. If this can't work, then I could use a logon script for that user, once the account is created and the user logs on.
Please don't give me advice on how to set a bitmap wallpaper. There is a registry key that can be set in Default User or Current User (HKCU) to assign a .bmp as the wallpaper and this setting takes effect immediately and reliably.
What I can't figure out how to do is set a .jpg and force Windows XP to refresh the desktop and display the new wallpaper. I can set the registry keys just fine for Default User and Current User and if I open the Display control panel to the Desktop tab, I can click OK and the wallpaper will change.
What is the trick to command Windows to do this from the command line? I'll accept a rundll32.exe (but the ones I've tried don't work) or a utility or applet that can run in a script, but I can't just pop open the Display control panel to the Desktop tab and make the user do it themselves. I could even accept an applet that converts .jpg to .bmp and sets the bitmap wallpaper registry key. How do you do it?