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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Corporate Screen Saver & GPO 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

I've been asked to set a corporate screen saver as default to all clients.

All seemed ok, I found the policy section under Admin Templates->Control Panel->Display.

However, the screensaver I want to run is the MyPictures with a sepcific picture location.

So I copied the .scr from my machine to a network share, which I then used as the screensaver executable.

However, even after right clicking the .scr and choosing 'configure' , setting the screensaver options.

When others get the screensaver it is not using the settings I have chosen and defaults to the my pictures folder in my documents.

I'm assuming that the settings for the screen saver are therefore not stored in the .scr executable.

However , I cannot find anywhere on the GPO a section for configuring specific screensaver settings.

So how do I set this without going to each machine manually and configuring the screensaver settings?

thanks,
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
ok i've found that apparently you can write some script or SPE (System Policy Editor) and make regkey changes via some type of scripting language.

I saw some info on o'reily but I couldn't make head nor tail of it, how you create this policy, what program you use to edit the file, where the file is stored, etc. etc. etc..

can someone guide me as to how I correctly force registry changes out to users so i can set the screen saver regkey
Code:
[HKEY_USERS\????what should be here????\Control Panel\Screen Saver.Slideshow]
"ImageDirectory"="X:\\ScreenSaver"

I'm thinking this has got to be easy peasy , but like anything, only when you know how!

thanks,
1DMF.


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
ok, i've found you can convert a regkey to a .ADM template with a program from Yizhar Hurwitz called nuts which includes RegtoADM link :
Great, now I just need to work out how you import .ADM files and make them policies?

Any help appreciated!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
can't see anything to do with location for .ADM files on that link?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
But some info on how to script any registry change ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
right I found how you add/remove .ADM files to the Admin Template.

but it isn't displaying ocrrectly and there doesn't seem the ability to change the setting via the GPO editor.

This is the .ADM file the REG2ADM program created...
Code:
CLASS USER

CATEGORY "Control Panel\Screen Saver.Slideshow"
KEYNAME "Control Panel\Screen Saver.Slideshow"

 POLICY "ImageDirectory"
  PART "ImageDirectory"
  EDITTEXT
  DEFAULT "X:\ScreenSaver"
  VALUENAME "ImageDirectory"
  END PART
 END POLICY

 POLICY "PaintInterval"
  PART "PaintInterval"
  NUMERIC
  VALUENAME "PaintInterval"
  END PART
 END POLICY

 POLICY "ChangeInterval"
  PART "ChangeInterval"
  NUMERIC
  VALUENAME "ChangeInterval"
  END PART
 END POLICY

 POLICY "DisplayFilename"
  PART "DisplayFilename"
  NUMERIC
  VALUENAME "DisplayFilename"
  END PART
 END POLICY

 POLICY "MaxScreenPercent"
  PART "MaxScreenPercent"
  NUMERIC
  VALUENAME "MaxScreenPercent"
  END PART
 END POLICY

 POLICY "DisableTransitions"
  PART "DisableTransitions"
  NUMERIC
  VALUENAME "DisableTransitions"
  END PART
 END POLICY

 POLICY "AllowStretching"
  PART "AllowStretching"
  NUMERIC
  VALUENAME "AllowStretching"
  END PART
 END POLICY

 POLICY "AllowKeyboardControl"
  PART "AllowKeyboardControl"
  NUMERIC
  VALUENAME "AllowKeyboardControl"
  END PART
 END POLICY

 POLICY "MaxFailedFiles"
  PART "MaxFailedFiles"
  NUMERIC
  VALUENAME "MaxFailedFiles"
  END PART
 END POLICY

 POLICY "MaxSuccessfulFiles"
  PART "MaxSuccessfulFiles"
  NUMERIC
  VALUENAME "MaxSuccessfulFiles"
  END PART
 END POLICY

 POLICY "MaxDirectories"
  PART "MaxDirectories"
  NUMERIC
  VALUENAME "MaxDirectories"
  END PART
 END POLICY

END CATEGORY

and when i view the source on the other .ADM files they don't look the same.

does anyone know if this program actually creates valid .ADM files from reg keys?



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
this is a bit puzzling, I found if I change the KEYNAME to
Code:
KEYNAME "Software\Policies\Microsoft\Windows\Control Panel\Screen Saver.Slideshow"

The policy then displays correctly with all the elements / attributes of the .ADM file and I can configure them accordingly.

However , as this isn't the correct registry location for this change, nothing happens and the changes don't take effect.

is it possible to get access to just
%USER%\Control Panel\Screen Saver.Slideshow

through standard Administrative Templates GPO menthod?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Cracked it!

I couldn't get the ADM method to work and neither could our server support guys!

So I decided to investigate the link left by PHV.

That MSDN site is just as bad as CPAN to understand!

But after an hour wading through and cross linking the methods and examples I worked out how to make the change I required.

Code:
const HKEY_CURRENT_USER = 2147483649
 
strComputer = "."

Set objRegistry = _
    GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _ 
    & strComputer & "\root\default:StdRegProv")

strKeyPath = "Control Panel\Screen Saver.Slideshow"
strValueName = "ImageDirectory"
strValue = "x:\screensaver"

objRegistry.SetStringValue HKEY_CURRENT_USER, strKeyPath,_
    strValueName, strValue

ok it's crude, no error trapping etc. but it works!

So thank you PHV, I know you thought I was ignoring you, but I wasn't , just wanted to exhaust the avenue I was currently persuing before cutting my losses and starting over again.

at least I now have a locked down corporate screensave, which I can control the settings of also!



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top