Re: How to change wallpaper using VBScript?



Save your wallpaper as a bitmap such as mybitmap.bmp, then

Dim WshShell

Set WshShell = WScript.CreateObject("Wscript.Shell")
WshShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", mybitmap.bmp
WshShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,
UpdatePerUserSystemParameters", 1, False

Set WshShell = Nothing



"mistral" <polychrom@xxxxxxxxxxxx> wrote in message
news:1152006618.786014.19400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Can someone help with script to change the Windows desktop Wallpaper
picture via VBScript or WSH? With ability to download image from URL
(not from local drive), i will provide a URL to an image which should
be set for a wallpaper.
I know this can be changed via the registry; so a Regwrite script would
do the trick. Does it possible to apply changes immediatelly, or user
must logoff/on for the changes to appear?

thank you.

mistral



.



Relevant Pages

  • Re: Setting Wallpaper via Group Policy
    ... I don't know how to set the wallpaper when you have disabled Active Desktop. ... Let the people that know anything about Group Policy answer that one. ... Set WshShell = WScript.CreateObject ...
    (microsoft.public.windows.group_policy)
  • Script to set wallpaper & set GPO
    ... we have several machines open to the public, ... identical wallpaper image and prevent the arbitrary change of desktop ... and finally reboot machine. ... Set WshShell = WScript.CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Script to set wallpaper and restrict changing
    ... we have several machines open to the public, and users might change the background image on the desktop of these machines, so I want to set an identical wallpaper image and prevent the arbitrary change of desktop wallpaper. ... I try write a handy script that will download required wallpaper image from http, then set this image as desktop wallpaper, then set policy to prevent wallpaper from changing, and finally reboot machine. ... Set WshShell = WScript.CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Re: How to change wallpaper using VBScript?
    ... Set WshShell = WScript.CreateObject ... Can someone help with script to change the Windows desktop Wallpaper ... With ability to download image from ...
    (microsoft.public.scripting.vbscript)