Set Wallpaper For Users

From Wiki

Jump to:navigation, search

Creator: BKGarry

Script Language: VBS

Forum topic Link: http://www.edugeek.net/forums/scripts/3402-using-vb-set-active-desktop-ie-wallpaper.html


<vb>Option Explicit

Dim objFileCopy, objFSO, objShell1, objShell2

Dim strRegRootA, strRegRootB


strRegRootA = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\"

strRegRootB = "HKEY_CURRENT_USER\Control Panel\Desktop\"


'Set objShell1 = CreateObject("WScript.Shell")

'objShell1.Run "C:\Windows\Resources\Themes\luna.theme"

'WScript.Sleep 1000

'objShell1.SendKeys "{ENTER}"


Set objShell2 = WScript.CreateObject("WScript.Shell")

objShell2.RegWrite strRegRootA & "BackupWallpaper", "\\FSERVER\NETLOGON\Backgrounds\pupil.bmp"

objShell2.RegWrite strRegRootA & "Wallpaper", "\\FSERVER\NETLOGON\Backgrounds\pupil.bmp"

objShell2.RegWrite strRegRootB & "Wallpaper", "\\FSERVER\NETLOGON\Backgrounds\pupil.bmp"

objShell2.Run "%windir%\System32\RUNDLL32.exe user32.dll,UpdatePerUserSystemParameters", 1, False


Set objShell1 = Nothing

Set objShell2 = Nothing

Set objFileCopy = Nothing

Set objFSO = Nothing


WScript.Quit </vb>