Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Wallpaper. 2

Status
Not open for further replies.

alex304

IS-IT--Management
Jan 29, 2001
83
US
I am running a login script to change users background. The only problem is that they have to log off and log back in for the registry change to take effect. Is there a command I could run to refresh their wallpaper to immediatley display the new wallpaper as apposed to logging out and then back in again???
 
I cannot help you with your script as such, but it is not a normal Windows request for a logoff when changing the Desktop background picture through the GUI. I can see that if you change the location of the background picture in the registry then a logoff may be required for that change to become apparent.

Would it be possible (I don't say easier) to script a change of the actual .bmp at this location -

C:\Documents and Settings\Usernamexxxx\Local Settings\Application Data\Microsoft\WALLPAPER1.bmp

If it is possible via a script to change the picture then the new picture might appear as soon as you run any script?
 
I use when I want to randomly change wallpapers.

I'm sure the change/update is part of the Windows API, and you'd have to have it encapsulated into a program run in your login script to make that change happen.
 
I just wrote a small little program to do this (and it works immediately). There's not much control over whether it stretches or tiles the image right now (I'm sure I'll learn how to do it to finish it out), but it does change the background immediately.

I don't have a place to host it, though, if you think it can be of use to someone.
 
It's written and solid enough now. Like I said, if enough people are interested, we can find a host. Else, if you can't find any other solution, we can work out a way to get a copy of it to you.
 
Meh. Here it is anyway for anyone that might need it for something.


Doc file is included in the ZIP file, which I will post here as well:

This program is freeware with no guarantees made
of any kind, legal or otherwise.

Documentation:
This program will, from the command-line change the
desktop wallpaper. This program does NOT support
active desktop, so it will only work with valid BMP
files.

The program should generally be unobtrusive as well -
if you provide it proper parameters, it will simply
perform its action and then exit. Otherwise it will
display a message box indicating the error.

Using it:

wpchange <parm1> <parm2>

Parm1 - the path to a valid BMP file. If you use an
extended name, enclose it with quotes.

Parm2 - option parm.
0 = center
1 = tile
2 = stretch

example call: wpchange "Gone Fishing.bmp" 1

This will place the named BMP onto the desktop and
tile it.
 
Glenn9999,

Thank you for sharing your script with other members. It was kind of you to put in the extra effort.
 
Yep...this is cool. I probably will not try it until later this week...got busy. Thanks a bunch.
 
Since I can't get to the site its hosted on, could someone please tell me if this works while logged in with policy restrictions that prevent you from changing wallpaper? TIA.

"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy"
Albert Einstein
 
Yes linney that still works and it is instantaneous.

"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy"
Albert Einstein
 
Yep linney. Actually, AFAIR, it uses the same API call that I used in this program to make the change on the desktop.
 
Do you not utalise group policy?

Hope this Helps.

Neil J Cotton
njc Information Systems
Systems Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top