How do I create my own Policy template?

John Savill

March 4, 1999

2 Min Read
ITPro Today logo in a gray background | ITPro Today

A. A. When system policy editor is run you can select which templates to include. There are 3 which are supplied with NT, and are stored in the %systemroot%/inf directory

  • common.adm

  • windows.adm

  • winnt.adm

The only ones you will use normally are common.adm and winnt.adm. Windows.adm was supplied for compatibility with windows95 machines, however policies created with Windows NT will not work on Windows 95 so this template is not used.

To select which templates to use, select "Policy template" from the options menu.

The structure of an adm file is simple and follows the structure shown below

CLASS MACHINE or USER CATEGORY !!   CATEGORY !! this is optional      POLICY !!      KEYNAME !!         VALUENAME !!         VALUEON "1" VALUEOFF "0"         PART !! TEXT          END PART      END POLICY   END CATEGORYEND CATEGORY[strings]="Windows NT Network"

Simple! The !! means what's after is a string and has to then be defined in the [strings] section. You don't have to use strings and can just put the entries directly be enclosing in quotes if it contains a space, it just might help for long key names if used repeatedly. For every keyword (except for class) there must be a end keyword, e.g. for category there must be a end category, same as an if and endif etc.

For examples, look at the common.adm and winnt.adm files and then compare to how they look in the system policy editor to get the display and effect you want. There are many other combinations and effects such as a drop down box which can be accomplished using the following

   PART !! DROPDOWNLIST   VALUENAME ""      ITEMLIST         NAME "" VALUE NUMERIC n         NAME "" VALUE NUMERIC n         NAME "" VALUE NUMERIC n      END ITEMLIST   END PART

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like