online help
Description
©www.microsoft.com
To create a custom .adm file:
Note that if you modify an .adm file while the System Policy Editor application
is running, you will need to reload the file. From the Options menu, select
Policy Template, and press OK. This reloads the structure, and your
new entries will be available. (You do not need to perform this step if you modify
a file before starting the System Policy Editor; the reload is done automatically
each time the System Policy Editor starts.)
Use a text editor to open the Winnt.adm file. The first entry of this file
is CLASS xxxx, where xxxx could be either:
These are the only two classes that are valid within the System Policy Editor.
The System Policy Editor checks the syntax of each .adm file when the files
are loaded, and displays a message if any errors are found.
CATEGORY !!MyNewCategory
To close the category after filling in the options, you would use:
END CATEGORY ; MyNewCategory
These can be nested to create sub-categories as follows:
CATEGORY !!FirstCategory
CATEGORY !!SecondCategory
CATEGORY !!ThirdCategory
...
...
END CATEGORY ; ThirdCategory
END CATEGORY ; SecondCategory
END CATEGORY ; FirstCategory
Be sure to specify the text for the variables you used above. In this case,
in the [strings] section of the .adm file, you would need to include:
FirstCategory="My First Category"
SecondCategory="My Second Category"
ThirdCategory="My Third Category"
KEYNAME System\CurrentControlSet\Services\
LanManServer\Parameters
POLICY !!MyFirstPolicy
Be sure to define MyFirstPolicy in the [strings] section of the .adm file.
Complete the policy specifics, and finish with an END POLICY statement.
Define the options available within the policy.
VALUENAME MyFirstValue
Remember that the VALUENAME needs to be within a PART if the option is selected
within the lower pane of the System Policy Editor (see the discussion of PART
and the code example below).
If not specified otherwise, the value will be written in the following format
when any administratory checks or unchecks the option:
Checked: REG_DWORD with a value of 1
Unchecked: Removes the value completely
Other options can specify what the user selects from and what gets written
to the registry.
PART !!MyVariable FLAG
...
END PART
where FLAG is one or more of the following:
PART !!MyPolicy TEXT
END PART
PART !!MyPolicy NUMERIC
VALUENAME ValueToBeChanged
END PART
PART !!MyPolicy DROPDOWNLIST
VALUENAME ValueToBeChanged
ITEMLIST
NAME "First" VALUE NUMERIC 1
NAME "Second" VALUE NUMERIC 2
NAME "Third" VALUE NUMERIC 3
NAME "Fourth" VALUE NUMERIC 4
END ITEMLIST
END PART
PART !!MyPolicy EDITTEXT
VALUENAME ValueToBeChanged
END PART
PART !!MyPolicy EDITTEXT REQUIRED
VALUENAME ValueToBeChanged
END PART
PART !!MyPolicy EDITTEXT EXPANDABLETEXT
VALUENAME ValueToBeChanged
END PART
PART !!MyPolicy EDITTEXT
VALUENAME ValueToBeChanged
MAXLEN 4
END PART
PART !!MyPolicy EDITTEXT
DEFAULT !!MySampleText
VALUENAME ValueToBeChanged
END PART
or
PART !!MyPolicy NUMERIC
DEFAULT 5
VALUENAME ValueToBeChanged
END PART
PART !!MyPolicy NUMERIC
MIN 100 MAX 999 DEFAULT 55
VALUENAME ValueToBeChanged
END PART
POLICY !!MyPolicy
KEYNAME ....
VALUENAME ValueToBeChanged
VALUEON "Turned On" VALUEOFF "Turned Off"
END POLICY
or
POLICY !!MyPolicy
KEYNAME ....
VALUENAME ValueToBeChanged
VALUEON 5 VALUEOFF 10
END POLICY