BGInfo via VBS startup script?
Bit of an odd one I've been battling with so just to try and shed some light on things...
I've been using BGInfo via batch files for ages now and it worked really well so I thought I'd go one better and get something to detect the screen res and do the BGInfo that way.
Got a script that reads the resolution via WMI then does the Select Case method to run the right wallpaper. Script runs fine if you run it manually as admin but when put as a startup script it doesn't modify the registry setting for the wallpaper or make the temporary bitmap file :confused:
I'm wondering if it's something to do with the shell.run command I'm using and the security context of the startup script? Seen a few odd bits on Google of similar problems but no real solution or reason behind it... anyone else using VBS and BGInfo to set the logon screen wallpaper?
(The same script works fine for user desktops btw)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * From Win32_DisplayConfiguration")
cmdline1024="c:\windows\bgibmp\bginfo.exe /i" & "\\domain\sysvol\domain\UserSettings\tools\logon1024.bgi" & " /accepteula /timer:0"
cmdline1680="c:\windows\bgibmp\bginfo.exe /i" & "\\domain\sysvol\domain\UserSettings\tools\logon1024.bgi" & " /accepteula /timer:0"
Const OverwriteExisting = TRUE
' Determine the size of the desktop
For Each objItem in colItems
X = objItem.PelsWidth
Y = objItem.PelsHeight
strScreenRes = X & "x" & Y
Select Case strScreenRes