Anubis3000
Programmer
Hi,
I am trying to set the desktop background using vbscript. I have tried everything in this thread:
This is my script file:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite"HKEY_USERS\.DEFAULT\Control Panel\Desktop\Wallpaper","C:\Documents and Settings\Desktop\New Folder\NULABWallpaper.JPG","REG_SZ"
WshShell.RegWrite"HKEY_USERS\.DEFAULT\Control Panel\Desktop\WallpaperStyle","0","REG_SZ"
WshShell.RegWrite"HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper","C:\Documents and Settings\Desktop\New Folder\NULABWallpaper.JPG","REG_SZ"
WshShell.RegWrite"HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle","0","REG_SZ"
wscript.echo "Wallpaper settings have been changed"
however, nothing works. When I go into the control panel and edit the display and then click on the desktop tab, the background is already changed to NULAB wallpaper, however, it is not displayed as wallpaper. I have administrator rights.
Please let me know if you have any advice. Thnx.
I am trying to set the desktop background using vbscript. I have tried everything in this thread:
This is my script file:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite"HKEY_USERS\.DEFAULT\Control Panel\Desktop\Wallpaper","C:\Documents and Settings\Desktop\New Folder\NULABWallpaper.JPG","REG_SZ"
WshShell.RegWrite"HKEY_USERS\.DEFAULT\Control Panel\Desktop\WallpaperStyle","0","REG_SZ"
WshShell.RegWrite"HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper","C:\Documents and Settings\Desktop\New Folder\NULABWallpaper.JPG","REG_SZ"
WshShell.RegWrite"HKEY_CURRENT_USER\Control Panel\Desktop\WallpaperStyle","0","REG_SZ"
wscript.echo "Wallpaper settings have been changed"
however, nothing works. When I go into the control panel and edit the display and then click on the desktop tab, the background is already changed to NULAB wallpaper, however, it is not displayed as wallpaper. I have administrator rights.
Please let me know if you have any advice. Thnx.