Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
July 9, 2006
I have scripted Wallpaper.vbs to allow you to switch your wallpaper with a script.
The syntax for using Wallpaper.vbs is:
CSCRIPT //NOLOGO C:FolderWallpaper.vbs "C:WindowsWallpaper.bmp"
Where C:FolderWallpaper.vbs is the full qualified path to the Wallpaper.vbs script, and "C:WindowsWallpaper.bmp" is the fully qualified path to the wallpaper file.
Wallpaper.vbs contains:
Dim WshShell, oArgsSet WshShell = WScript.CreateObject("Wscript.Shell")set oArgs=wscript.argumentsIf oArgs.Count > 0 Then WshShell.RegWrite "HKCUControl PanelDesktopWallpaper",
" & oArgs(0) &
" WshShell.Run "%windir%System32RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters", 1, False Else Wscript.Echo "Syntax: CSCRIPT //NOLOGO C:UTILWallpaper.vbs ""C:WindowsWallpaper.bmp"""End IfSet WshShell = Nothing
You May Also Like