Dbyte
Technical User
- Mar 6, 2002
- 87
I am trying to setup a single screensaver companywide using VBScript login script & GPOs. We have both XP & 2K workstations & 2 Win2000 AD servers. The screensaver is ssmypics.scr. My VBScript copies this file to the appropriate system32 folder (based on OS) makes the following registry edits:
I have already confirmed that ssmypics.scr is being copied into the system32 folder on all systems. I also manually replicated settings between AD servers. In addition to the code above I manually edited the following GPOs in User Policy:
Activate screen saver Enabled
Screen saver executable name ssmypics.scr
Screen saver timeout 900
The screen saver isn't working on 2K workstations. I ran gpresult on certain workstations (both OSs) to confirm policies were applied. I can still view the screensaver tab on Display properties, but the Preview button doesn't work, nor does the small screen in the top of the popup window show any images in it.
What am I missing?
Code:
Option Explicit
'Declare variables
Dim sComputer, oWMI, oShell, oFSO, colItems, oItem, sOS
sComputer = "."
Set oWMI = GetObject("winmgmts:\\" & sComputer & "\root\CIMV2")
Set oShell = WScript.CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set colItems = oWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem",,48)
'Get OS version
For Each oItem in colItems
sOS = oItem.Caption
Next
'Copy .scr file to correct System32 folder based on OS version
If sOS = "Windows XP Professional" Then
oFSO.CopyFile "\\server\share\ssmypics.scr", "C:\WINDOWS\system32\ssmypics.scr", True
ElseIf sOS = "Microsoft Windows 2000 Professional" Then
oFSO.CopyFile "\\server\share\ssmypics.scr", "C:\WINNT\system32\ssmypics.scr", True
End If
'Registry edits
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\AllowKeyboardControl", "1", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\AllowStretching", "0", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\ChangeInterval", "10000", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\DisableTransitions", "0", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\DisplayFilename", "0", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\MaxDirectories", "200", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\MaxFailedFiles", "1000", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\MaxScreenPercent", "100", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\MaxSuccessfulFiles", "65536", "REG_DWORD"
oShell.RegWrite "HKCU\Control Panel\Screen Saver.Slideshow\PaintInterval", "0", "REG_DWORD"
'Clean up & quit
Set oWMI = Nothing
Set oShell = Nothing
Set oFSO = Nothing
Set oItem = Nothing
WScript.Quit
I have already confirmed that ssmypics.scr is being copied into the system32 folder on all systems. I also manually replicated settings between AD servers. In addition to the code above I manually edited the following GPOs in User Policy:
Activate screen saver Enabled
Screen saver executable name ssmypics.scr
Screen saver timeout 900
The screen saver isn't working on 2K workstations. I ran gpresult on certain workstations (both OSs) to confirm policies were applied. I can still view the screensaver tab on Display properties, but the Preview button doesn't work, nor does the small screen in the top of the popup window show any images in it.
What am I missing?