Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screensaver setup via GP not working

Status
Not open for further replies.

Dbyte

Technical User
Mar 6, 2002
87
0
0
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:
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?
 
Either the screen saver is corrupt or you are missing some settings.

I would try twitching to another screen saver and then back to the desired one to see if the system automatically configures it. Use a program like RegSnap to compare before and after registry changes.

Take the script out of the picture for now and try the steps you are doing manually. If the screen saver does not work you know it is a problem with what you are setting or with the file itself.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
If the screensaver were corrupt it would affect all workstations, whereas our only failures are on 2K PCs. So I must be missing some settings. Let me try your other ideas & I'll post back w/ further info.

Thanks for the quick reply.
 
Problem solved! The root cause was a missing .dll file in the system32 folder of 2K machines: gdiplus.dll. The best part was finding a website w/ the info in a foreign language, translating it (badly), then trying to read & understand it.

I have to admit my days are never boring.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top