Add a Registry Key via Group Policy

  • Thread starter Thread starter bjorgenson
  • Start date Start date
B

bjorgenson

How can I add a new registry key using group policy? I don't want to
change an existing key but add a new one.

Is there a way using ADM templates? If so, what is the syntax?

This is what I want to add:

HKEY_CLASSES_ROOT\Folder\shell\PC Info\command

VALUE=c:\my program.exe
 
Hi,

How can I add a new registry key using group policy? I don't want to
change an existing key but add a new one.

Create an own ADM Template.
Is there a way using ADM templates? If so, what is the syntax?
http://www.oreilly.de/catalog/winsyspe/chapter/ch08.html

This is what I want to add:
HKEY_CLASSES_ROOT\Folder\shell\PC Info\command
VALUE=c:\my program.exe

HKClasses Root is just a link to:
HKLM\Software\Classes

If your type of VALUE is the (Default) inside the registry
you have to define it like that: ""
(no name given, but enclosed in Qoutes)

----- shell.adm -----
CLASS MACHINE
CATEGORY "give it a name you want"
POLICY "give it a name you want"
KEYNAME "SOFTWARE\Classes\Folder\shell\PC Info\command"
PART "whatever you want to set:" EDITTEXT
VALUENAME ""
END PART
END POLICY
END CATEGORY

----- shell.adm -----

Make sure, that you change the View settings after importing
the ADM Template and uncheck in the filtering:
"... only full managed"

Or just simply use the Registry Extension from DesktopStandard.
(Freeware) than you don´t have to create an ADM.

Mark
 
I'm confused on the PART section. The oreily.de site does not explain
it well enough. What would I use in this case? I don't want a checkbox
or anything like that, just an EDITTEXT field to be able to change the
path of my executable.

Thanks,
Brian
 
OK, I think I have it figured out but I do want to change my default
key value. The default value has to remain a REG_SZ.
 
Nevermind, figured it out. This is what I used:

CLASS MACHINE
CATEGORY "PC Info"
POLICY "PC Info Policy"
EXPLAIN !!SetPath
KEYNAME "SOFTWARE\Classes\Folder\shell\PC Info\command"
PART !!PathName EDITTEXT
Valuename ""
END PART
END POLICY
END CATEGORY

[strings]
SetPath="Enter path to location of executable"
PathName="Enter path:"

Thanks for your help
 
Back
Top