Copy image file based on screen resolution.
I would like a script that will copy a image file based on the screen resolution. What i am trying to do it set it as the W7 logon wallpaper. The issue is the wallpaper will looked stretched on different screens around if i use a single file. So i am adapting this script - http://www.edugeek.net/forums/window...tml#post754637
I have tweaked it and my code looks like this. Can anyone see any errors please?
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
strResolution = CStr(intHorizontal) & " x " & CStr(intVertical)
Select Case strResolution
Case "1024 x 768"
strWallpaperPath = "\\bishopsgarth\dfs$\Public$\WALLPAPERS\1024x768.bmp"
Case "1280 x 1024"
strWallpaperPath = "\\bishopsgarth\dfs$\Public$\WALLPAPERS\1280x1024.bmp"
Case "1440 x 900"
strWallpaperPath = "\\bishopsgarth\dfs$\Public$\WALLPAPERS\1440x900.bmp"
Case "1920 x 1080"
strWallpaperPath = "\\bishopsgarth\dfs$\Public$\WALLPAPERS\1920x1080.bmp"
filesys.CopyFile strWallpaperPath, "c:\Windows\System32\Oobe\info\backgrounds"