Vista Wallpaper VB login script - refresh problem


  Reply to this topic Start new topic Start Poll

> 

Vista Wallpaper VB login script - refresh problem

Windows Vista

TheBrainless
Dec 14 2007, 05:56 AM | Tags: Refresh Login Script Wallpaper
Related tags: Hard Plain Card Into Openimg Upgrade Play Connection Forms Videos Comes Mui


Member
*****

Group: Members
Posts: 437
Member No.: 1303
Joined: 20-July 07



Hello, I put together a VB login script for XP and I'm trying to get it working in Vista. I'm currently having some trouble getting Vista to realize that I've changed the desktop wallpaper.
I am able to apply a new desktop with the script below but the desktop image will not change until I either restart the computer or open the "Control Panel->Personalization-
QUOTE
Desktop Background" window.

Below is a simplified version of the wallpaper change script that works in XP. wallpaper.vbs '_______________________________________________________ Set oShell = CreateObject("WScript.Shell") Set oFSO = CreateObject("Scripting.FileSystemObject") sWinDir = oFSO.GetSpecialFolder(0) sWallPaper = "z:\vista profile test\wall\test1.bmp" ' update in registry oShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", sWallPaper ' let the system know about the change oShell.Run _ "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", _ 1, True '_______________________________________________________ So... anyone have an idea on how to get this working in Vista?
Thanks in advance,
Miroku
PM Email Poster
Top
thewarden
Dec 15 2007, 02:38 AM | Tags: Wallpaper Login Refresh Script
Related tags: Machines 2003 File Syncback Hangsfreezes Ultimate Permanently Email Startup Rc2 Displayview


Member
***

Group: Members
Posts: 190
Member No.: 676
Joined: 25-November 07



Note: I found a post very similar to my own... groups.google.com/group/microsoft.public.scripting.vbscript/browse_thread/thread/3b1cec35aaf4cea2/6543d44935e08671?lnk=st&q=vista+wallpaper+vb+script&rnum=1&hl=en#6543d44935e08671
Unfortunately, I still can't seem to get it working using the info in the above link. I'll continue searching for an answer on my own but any help would be greatly appreciated.
Miroku
PM Email Poster
Top
BlueXiphoid
Dec 15 2007, 07:06 AM | Tags: Login Script Refresh Wallpaper
Related tags: Window Pre Write Running Unable Smtp Downloading Sned Tree Continues


Member
***

Group: Members
Posts: 131
Member No.: 13
Joined: 10-July 08




QUOTE
Note: I found a post very similar to my own... groups.google.com/group/microsoft.public.scripting.vbscript/browse_thread/thread/3b1cec35aaf4cea2/6543d44935e08671?lnk=st&q=vista+wallpaper+vb+script&rnum=1&hl=en#6543d44935e08671
Unfortunately, I still can't seem to get it working using the info in the above link. I'll continue searching for an answer on my own but any help would be greatly appreciated.
Miroku


You might be better looking at the SystemParametersInfo function in user32.dll.
There's an example on this page (with the relevant constant values), of how to change your wallpaper using VB, which works fine in Vista also
support.microsoft.com/kb/97142
It may be possible to come up with something similar using a rundll32.exe command line and VBScript alone (?).
Jon
PM Email Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topic Start new topic Start Poll