scripting a wallpaper change?

G

Guest

Can anyone point me to a how-to on changing desktop wallpaper via a
command-line instruction, or ActveX script, etc.?

I'd like to be able to run two such commands or scripts:
1. set wallpaper to "none"
2. set wallpaper to an image file specified in the script (no need for a
chooser dialog)

Thanks for any help!

--Ray
 
L

Leonard Grey

There are many 'wallpaper switcher' utilities available on the web which
may offer the functionality you need.
 
G

Guest

I suppose there's no reason I couldn't resort to one of those . . . it just
seems that might be a little overkill-ish since I don't want to cycle through
my 10 favorite images, etc., but just to turn wallpaper off and then back on
again.

Reason being that my machine here at work developed an apparently
unresolvable wallpaper disappearance malfunction (per my earlier post
"wallpaper disappears after login" in the XP General Questions section of
this forum) and I'm now just trying to put a band-aid on the problem since
(1) it's too insignificant an issue for my IT dep't to devote time to and (2)
I can't reinstall or use a system restore point because it's a work computer.

Thanks for the suggestion--I might wind up going with that!
 
L

Leonard Grey

Please let us know how things work out (by replying to your own
message.) You'll be helping someone else who may have the same problem.
 
R

Ramesh, MS-MVP

This info might help.
http://groups.google.com/group/microsoft.public.windowsxp.customize/msg/1e5fa2cf37183163

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com


Can anyone point me to a how-to on changing desktop wallpaper via a
command-line instruction, or ActveX script, etc.?

I'd like to be able to run two such commands or scripts:
1. set wallpaper to "none"
2. set wallpaper to an image file specified in the script (no need for a
chooser dialog)

Thanks for any help!

--Ray
 
H

HEMI-Powered

Leonard Grey added these comments in the current discussion du
jour ...
There are many 'wallpaper switcher' utilities available on the
web which may offer the functionality you need.

The one I use is the Power Toy Wallpaper Changer, but it is a
GUI-based app, not command or "BAT-file" like at all. It is a
very nice app, though, that allows not only any/all graphics
files in a given folder to be cycled from as little as 15 minutes
to once a week, and allows a 365-day "holiday" and special
occasion folder to override what's in the default changing
folder.
 
H

HEMI-Powered

=?Utf-8?B?UmF5ZGFy?= added these comments in the current
discussion du jour ...
I suppose there's no reason I couldn't resort to one of those
. . . it just seems that might be a little overkill-ish since
I don't want to cycle through my 10 favorite images, etc., but
just to turn wallpaper off and then back on again.

Reason being that my machine here at work developed an
apparently unresolvable wallpaper disappearance malfunction
(per my earlier post "wallpaper disappears after login" in the
XP General Questions section of this forum) and I'm now just
trying to put a band-aid on the problem since (1) it's too
insignificant an issue for my IT dep't to devote time to and
(2) I can't reinstall or use a system restore point because
it's a work computer.

Thanks for the suggestion--I might wind up going with that!
Depends on how many graphics files you want to cycle through and
what cycle time(s) you want. Try the MS XP Wallpaper Changer. I
found it someplace on MS's web site, but lost the link or I'd
post it for you. I'm sure a quickie Google would find it, though.
Good luck!
 
G

Guest

Your replies were very helpful--thank you! I managed to get the job done
with a 4-line batch file, which I'm going to throw into my Startup folder so
that the era of manually changing my wallpaper settings every morning will
end. :)

The command
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
was instrumental, 'cause after finding out at
http://commandwindows.com/reg.htm
how to change registry entries by command line (using the /f switch in the
batch file to get past the are-you-sure overwrite prompt), I suspected and
then confirmed I could change what my wallpaper was designated as all day
long but wouldn't see the results unless I did some kind of refresh to effect
the change.

So thanks again, and here's how the batch file goes, for anyone else this
might help:

reg add "hkcu\control panel\desktop" /v wallpaper /t REG_SZ /d "" /f

RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

reg add "hkcu\control panel\desktop" /v wallpaper /t REG_SZ /d "C:\[INSERT
PATH TO IMAGE FILE HERE]\Mars Rover wallpaper 1280x1024.bmp" /f

RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

--Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top