Command Line Display Settings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anybody know of a command line utility to change display settings, such
as screensaver and desktop background image?

Thanks,
Jason Ryon
 
Jason said:
Does anybody know of a command line utility to change display
settings, such as screensaver and desktop background image?
Hi,

For the wallpaper, you can use this free command line utility:

Set Wallpaper (SetWallpaper.exe)
http://www.optimumx.com/download/


This VBScript (.vbs file) will handle both the wallpaper and
screen saver settings:

'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

sWinDir = oFSO.GetSpecialFolder(0)
sWallPaper = sWinDir & "\Coffee Bean.bmp"

' update in registry
sRegKey = "HKCU\Control Panel\Desktop\"

' wallpaper setting
oShell.RegWrite sRegKey & "Wallpaper", sWallPaper

' screen saver settings
oShell.RegWrite sRegKey & "SCRNSAVE.EXE", "logon.scr", "REG_SZ"
oShell.RegWrite sRegKey & "ScreenSaverIsSecure", "1", "REG_SZ"
oShell.RegWrite sRegKey & "ScreenSaveActive", "1", "REG_SZ"
oShell.RegWrite sRegKey & "ScreenSaveTimeOut", "900", "REG_SZ"

' let the system know about the change
oShell.Run _
"%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", _
1, True
'--------------------8<----------------------


WSH 5.6 documentation (local help file) can be downloaded from here
if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top