talltim
asked on
Problem with registry path when creating custom .adm file
I am attempting to create a custom .adm file to control the folder used by the My Pictures Slideshow screensaver. My understanding is that it need to change the registry entry that gives the path to the folder. I have used Regshot to find out exactly which key gewts changed when I change the path from the default (HKEY_USERS\S-1-5-21-12832 3046-18983 21161-1566 985067-337 0\Control Panel\Screen Saver.Slideshow\ImageDirec tory: "C:\Documents and Settings\TestUser\Desktop" in my case) This key is only created if the path is changed from the default (C:\Documents and Settings\TestUser\My Documents\My Pictures).
The .adm file I have created is:-
CLASS USER
CATEGORY !!ControlPanel
CATEGORY !!Display
POLICY !!MyPicsSet
KEYNAME "Control Panel\Screen Saver.Slideshow"
PART "Path to folder used by screensaver" COMBOBOX
VALUENAME "ImageDirectory"
SUGGESTIONS
"C:\WINDOWS\Corporate Desktop\Screensaver"
END SUGGESTIONS
END PART
EXPLAIN !!MyPicsSet_Explain
END POLICY ;MYPicsSet
END CATEGORY ;Display
END CATEGORY ;Desktop
[strings]
ControlPanel="Control Panel"
Display="Display"
MyPicsSet="My Pictures Slideshow screensaver"
MyPicsSet_Explain="Custom Policy\n\nDefines the folder location used by the My Pictures Slideshow screensaver.\n\nThe My Pictures Slideshow screensaver cycles through all image files located in the folder specifed."
Now this policy won't display in the GPE. If I change the registry key path to "Software\Policies\Microso ft\Windows \Control Panel\Screen Saver.Slideshow" for example, the policy shows in the GPE and when assigned to a test user, creates the registry key. However as this is the wrong location it has no effect on the screensaver.
The problem, as far as I can see is that the key I need to change is located in HKEY_USERS\S-1-5-21-128323 046-189832 1161-15669 85067-3370 \ which I would imagine changes for every user. What do I need to do to get around this?
Tim
The .adm file I have created is:-
CLASS USER
CATEGORY !!ControlPanel
CATEGORY !!Display
POLICY !!MyPicsSet
KEYNAME "Control Panel\Screen Saver.Slideshow"
PART "Path to folder used by screensaver" COMBOBOX
VALUENAME "ImageDirectory"
SUGGESTIONS
"C:\WINDOWS\Corporate Desktop\Screensaver"
END SUGGESTIONS
END PART
EXPLAIN !!MyPicsSet_Explain
END POLICY ;MYPicsSet
END CATEGORY ;Display
END CATEGORY ;Desktop
[strings]
ControlPanel="Control Panel"
Display="Display"
MyPicsSet="My Pictures Slideshow screensaver"
MyPicsSet_Explain="Custom Policy\n\nDefines the folder location used by the My Pictures Slideshow screensaver.\n\nThe My Pictures Slideshow screensaver cycles through all image files located in the folder specifed."
Now this policy won't display in the GPE. If I change the registry key path to "Software\Policies\Microso
The problem, as far as I can see is that the key I need to change is located in HKEY_USERS\S-1-5-21-128323
Tim
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The line positioning is acually as you suggest in my ADM, it was a copy/paste error that made it show incorrectly in my post!
I have had a look at what you say about filtering, and yes, when I remove the tick from 'Show only policy settings that can be fully managed' my missing policy appears. It does however have a red mark next to it instead of blue.
Testing the configured policy shows that the correct path for the image folder appears in the screensaver properties. However it is still possible for a user to change this path (although it resets when they log on next time) and other settings within the screensaver. However =I can use the (built in) Hide screensaver tab policy to get round this problem.
For any future referers to this question this Microsoft document http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/management/gp/admtgp.mspx describes the difference between fully managed and 'preference' policies. My browser tell me I had looked at it before but I don't remember it!
I am going to give you the points for this. Thanks :-D
I have had a look at what you say about filtering, and yes, when I remove the tick from 'Show only policy settings that can be fully managed' my missing policy appears. It does however have a red mark next to it instead of blue.
Testing the configured policy shows that the correct path for the image folder appears in the screensaver properties. However it is still possible for a user to change this path (although it resets when they log on next time) and other settings within the screensaver. However =I can use the (built in) Hide screensaver tab policy to get round this problem.
For any future referers to this question this Microsoft document http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/management/gp/admtgp.mspx describes the difference between fully managed and 'preference' policies. My browser tell me I had looked at it before but I don't remember it!
I am going to give you the points for this. Thanks :-D
ASKER