
Originally Posted by
edie209
Funny just started looking at this today so is that script on here?
Here you go:
Code:
Set objWMIService = GetObject("Winmgmts:\\.\root\cimv2")
Set objSh = CreateObject("Wscript.Shell")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor where DeviceID = 'DesktopMonitor1'",,0)
For Each objItem in colItems
intHorizontal = objItem.ScreenWidth
intVertical = objItem.ScreenHeight
Next
strResolution = CStr(intHorizontal) & " x " & CStr(intVertical)
Select Case strResolution
Case "1024 x 768"
strWallpaperPath = "C:\folder\1024x768.jpg"
Case "1280 x 1024"
strWallpaperPath = "C:\folder\1024x768.jpg"
Case "1440 x 900"
strWallpaperPath = "C:\folder\1024x768.jpg"
Case "1920 x 1080"
strWallpaperPath = "C:\folder\1024x768.jpg"
Case Else
End Select
'Set the reg value
objSh.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", strWallpaperPath, "REG_SZ"
'Apply the change
objSh.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 0, False