Gah it looks like the script is broken. Does anyone here know some VB? Here's the code: (I've tried to sort it out a bit, but what I know about VB can do more harm)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("Winmgmts://localhost/root/cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor where DeviceID = 'DesktopMonitor1'",,0)
strFileType = "JPEG"
For Each objItem in colItems
intX = objItem.ScreenWidth
intY = objItem.ScreenHeight
Next
Select Case intX
Case "768"
Select Case intY
Case "1024"
strRes = intX & "x" & intY
Case "1280"
strRes = intX & "x" & intY
End Select
Case "900"
Select Case intY
Case "1600"
strRes = intX & "x" & intY
End Select
Case "1024"
Select Case intY
Case "768"
strRes = intX & "x" & intY
Case "1280"
strRes = intX & "x" & intY
End Select
Case "1050"
Select Case intY
Case "1680"
strRes = intX & "x" & intY
End Select
Case "1080"
Select Case intY
Case "1920"
strRes = intX & "x" & intY
End Select
Case "1152"
Select Case intY
Case "864"
strRes = intX & "x" & intY
End Select
Case "1280"
Select Case intY
Case "768"
strRes = intX & "x" & intY
Case "920"
strRes = intX & "x" & intY
Case "1024"
strRes = intX & "x" & intY
End Select
Case "1600"
Select Case intY
Case "900"
strRes = intX & "x" & intY
End Select
Case "1680"
Select Case intY
Case "1050"
strRes = intX & "x" & intY
End Select
Case "1920"
Select Case intY
Case "1080"
strRes = intX & "x" & intY
Case "1200"
strRes = intX & "x" & intY
End Select
End Select
currentDirectory = left(WScript.ScriptFullName,(Len(WScript.ScriptFullName))-(len(WScript.ScriptName)))
strComposedFileName = strRes & "." & strFileType
If (objFSO.FileExists(currentDirectory & "" & strComposedFileName )) Then
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!root/cimv2")
Set colFiles = objWMIService.ExecQuery("Select * from CIM_DataFile where Path = '\windows\web\wallpaper\windows'")
For Each objFile in colFiles
msgbox objFile.name
objFile.DeleteFile()
Next
set strWallpaperFile = objFSO.GetFile(currentDirectory & "" & strComposedFileName)
objFSO.CopyFile strWallpaperFile , "C:\windows\web\wallpaper\windows", OverwriteExisting
End If