M
MirokuKage
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-
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
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-
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