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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Wallpaper in Vista

Status
Not open for further replies.

pmidds

MIS
Jul 9, 2003
35
0
0
GB
Hi trying to write a script that updates the wallpaper in Vista.

Change the registry then try and force a refresh but nothing happens only works afetr rebooting.

Have tried

oShell.Run sWinDir & "\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True

which used to work in XP but no good on Vista.

Have also tried the following

Set onShell = createobject("shell.application")
Set oDesktop = onShell.Namespace(0)
oDesktop.self.invokeVerb "R&efresh"

&

Set UIHelper = CreateObject("Shell.UIHelper")
UIHelper.RefreshOfflineDesktop

&

Set expNameSpace = CreateObject("ShellNameSpace.ShellNameSpace")
'expNameSpace.Synchronize

Anyone done this in Vista?

TIA
 
but nothing happens only works afetr rebooting

Is rebooting realy needed or just a logoff/logon?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Logging off and back on does the trick but doesn't solve my problem I want it to be totally silent.

Anyone found a way of refreshing Vista wallpaper things like wallpaper get updated?
 
So how are you implementing the wallpaper then? If you do this via GPO it will be silent and take affect when the user logs in.

Are you trying to change it on the fly in the middle of the day?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
So how are you implementing the wallpaper then? If you do this via GPO it will be silent and take affect when the user logs in.

Are you trying to change it on the fly in the middle of the day?"

We want to do it on a specific date / time ie Thursday @ 09:00.

Problem is we have users who don't log in and out for weeks (they just lock) so waiting for user logon does not meet our needs.
 
pmidds said:
Problem is we have users who don't log in and out for weeks (they just lock)

Ed Crowley said:
There is seldom a technological solution to a behavioral problem

vbs could certainly be used to get the wallpaper file onto the machine (scheduled task, GPO, etc). But I haven't been able to find out how to do a refresh. Login is still the best way, IMHO.

Pat Richard, MCSE MCSA:Messaging CNA
Microsoft Exchange MVP
 
Problem is we have users who don't log in and out for weeks (they just lock) so waiting for user logon does not meet our needs.

You can force log off via GPO. Doing so will train your users that they must close their applications.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
i cant see the issue with what pmidds is trying to achieve, i think it is a legitimate requirement to say "right, i want all users on tuesday at 10am to get the following xyz" as it happens the exact thing pmidds wants is to have their wallpaper changed. changing wallpapers without the need to log off/on reboot etc is an old problem and was typicall solved as pmidds suggests using the run32dll thing-e-bob.

google has revealed the below but apparently none work (or are advised?)

puke
Option Explicit
Dim WSHShell, strDesktop
Set WSHShell = WScript.CreateObject("WScript.Shell")
strDesktop = WSHShell.SpecialFolders("Desktop")
WSHShell.AppActivate strDesktop
WSHShell.SendKeys "{F5}"
WScript.Quit

puke
' Refresh the desktop to remove the deleted shortcuts correctly
set oShell = createobject("shell.application")
set oDesktop = oShell.Namespace(0)

oDesktop.self.invokeVerb "R&efresh"
set oShell = Nothing
set oDesktop = Nothing

puke
Set WApp = CreateObject("Shell.Application")
WApp.Namespace(0).Self.InvokeVerb "Refresh

puke
Set UIHelper = CreateObject("Shell.UIHelper")
UIHelper.RefreshOfflineDesktop


Set expNameSpace = CreateObject("ShellNameSpace.ShellNameSpace")
expNameSpace.Synchronize
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top