Deploy registry key using .adm file

I want to distribute a registry key by using a .adm file (a Group Policy administrative template).  I've searched several times for examples of syntax but I haven't found any.  What is the syntax for adding a key in, say, HKLM\Software\xyz\subkey?  
LVL 11
snoopfroggAsked:
Who is Participating?
 
Toni UranjekConsultant/TrainerCommented:
Hi!

Post complete registry path, keyname and value and I might be able to help you.

Toni
0
 
merowingerCommented:
hi,
to set a value which can be on of off

test.adm*******************************************************
CLASS USER                                                       <-----HKEY User
CATEGORY!!SampleCategory
    KEYNAME "SOFTWARE\Policies\Microsoft\ADM_Samples"
    POLICY!!Sample_ADM_FeatureOnOff
        #if version >= 4
            SUPPORTED!!SUPPORTED_WindowsXPSP1
        #endif
        EXPLAIN!!Sample_ADM_FeatureOnOff_Help
        VALUENAME "ADM_Sample_FeatureOnOff"
            VALUEON 1
            VALUEOFF 0
    END POLICY
END CATEGORY
***************************************************************
To set a reg key which can have one or more values:

test2.adm***************************************************
POLICY!!Sample_ADM_DropDownList
    #if version >= 4
        SUPPORTED!!SUPPORTED_WindowsXPSP1
    #endif
    EXPLAIN!!Sample_ADM_DropDownList_Help
    PART!!Sample_ADM_DropDownList DROPDOWNLIST REQUIRED
        VALUENAME "Sample_ADM_DropDownList"
            ITEMLIST
             NAME !!Sample_ADM_DropDownList_Always    VALUE NUMERIC 1 DEFAULT
             NAME !!Sample_ADM_DropDownList_WorkStationOnly    VALUE NUMERIC 2
             NAME !!Sample_ADM_DropDownList_ServerOnly    VALUE NUMERIC 3
         END ITEMLIST
    END PART
END POLICY
***************************************************************

You can check the files, when u include the .adm file in your group policies,
if they are listed right!

Here are further informations:
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/technologies/management/gp/admtgp.mspx#ESNAC
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
snoopfroggAuthor Commented:
Yall,

Thanks for the input so far.  I'm going to test with what you've provided me so far.  I'll get back with you.
0
 
snoopfroggAuthor Commented:
toniur,

The path is HKLM\Software\Peoplesoft.  I'd like to create a key under Peoplesoft with a trivial value.
0
 
pranavamhariCommented:
Have you checked the command line options of regedit.exe ?

for example, you can merge a .reg file with registry using

regedit.exe /s myfile.reg


regards
Hari
http://www.acelogix.com
0
 
Toni UranjekConsultant/TrainerCommented:
If this would be path to your registry key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Peoplesoft]
"Peoplesoft-Key"="Data"

This would be corresponding adm file:

CLASS MACHINE

CATEGORY "SOFTWARE\Peoplesoft"
KEYNAME "SOFTWARE\Peoplesoft"

 POLICY "Peoplesoft-Key"
  PART "Peoplesoft-Key"
  EDITTEXT
  DEFAULT "Data"
  VALUENAME "Peoplesoft-Key"
  END PART
 END POLICY

END CATEGORY
0
 
and235100Commented:
My link gave this information...
0
 
Toni UranjekConsultant/TrainerCommented:
Apparently it did not help, otherwise your answer would have been accepted. No ofence.
0
 
and235100Commented:
@ toniur
I wasn't getting at you...
It is not my fault that the Asker didn't request extra information - in regard to my comment... so obviously it was ignored.

@ snoopfrogg
Please read all given comments - sometimes you learn more if you work some of the problem out yourself, when given a relevant reference to build on...
0
 
snoopfroggAuthor Commented:
Thanks to all contributors.  Honestly, I 'm still working through the problem.  Now that I'm looking through the URL and235100 provided, I see what I need.  Toniur, thanks for the example- that really clears me up.

@ and235100
Your feeling slighted by splitting points with another poster due to not being thorough is not reason to chastise the original poster.  
0
 
and235100Commented:
@ snoopfrogg

The point was - you never actually got back and said "I have looked at that link - but don't know eactly what I need" (or similar)
I probably would have been more inclined to go into detail if you had - but I thought that the reference given by Microsoft was clear enough...

It is not about the points - it is about the average Asker on this website ignoring a perfectly good comment - just because it is a link to another site - I could have typed out CLASS MACHINE etc. etc. but you didn't actually come back to me and say you needed more help.
0
 
snoopfroggAuthor Commented:
and235100,

I didn't ignore your comment- you're assuming that I did.  I said in my second post "I'm going to test with what you've provided me so far. "

You assumed that your comment was "perfectly good" and that you didn't need to go into more detail initially because you "thought the reference given by Microsoft was clear enough."  Perhaps this is a lesson in being thorough.
0
 
and235100Commented:
If that is your viewpoint, then yes.
You will have to participate at EE a fair amount of time before instructing me in "being thorough".

And for clarity - a definition of a "reference" is:
"use or recourse for purposes of information" and "a book, passage, etc., to which one is directed"

Being as we are conversing about a Microsoft product - then one of their "references" seems ideal to "direct" someone to.

0
 
Toni UranjekConsultant/TrainerCommented:
I still do not know, does my (or anyone else's) suggestion work? If not, what's the problem?
0
 
snoopfroggAuthor Commented:
Again, toniur *could* have provided me a reference, *assuming* that *would* suffice, but he was actually thorough.  

"Thorough" is something one can look up in a dictionary, also, no matter how many points one has on EE and no matter how large one's ego may have grown correspodingly.
0
 
and235100Commented:
If you are going to point out my faults  - please spell correctly when doing it.
:)

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.