App I -- System Policy Editor Keyword Reference Editor Keyword Reference8
Troubleshooting and Configuring the Windows NT/95 Registry
- I -
System Policy
Editor Keyword Reference
Understanding current System Policy Editor template files can be difficult
if you don't understand the syntax used. Creating custom policies is virtually impossible
without that understanding. This appendix focuses on the individual keywords used
in System Policy Editor to facilitate the understanding and creation of template
files. The concepts and the procedures will work equally well for Windows NT and
Windows 95. The structure of the .ADM files and types of options for them
are exactly the same for both operating systems. In this reference, simply replace
COMMON.ADM with ADMIN.ADM for Windows 95. Figure I.1 illustrates
the relationship of CATEGORY, POLICY, and PART components
of a template file.
Figure
I.1. The hierarchical
structure of template files.
T emplate files are text files with .ADM extensions. They can be edited
by any word processor or text editor. All entries in the file must be separated by
a space, a tab, or a hard return. Multiple spaces, tabs, or hard returns are still
considered a single separator.
NOTE: .ADM file entries are not case-sensitive.
In this appendix, however, the part of the file is listed in UPPERCASE, to distinguish
it from simple text.
CLASS
CLASS determines whether the change is for the computer or the user.
The only valid entries are MACHINE and USER. These also determine
which handle key gets updated. MACHINE updates HKEY_LOCAL_MACHINE,
and USER updates HKEY_USERS.
CATEGORY/END CATEGORY
The CATEGORY listing is the first level of choices in System Policy Editor.
It allows the grouping of policies for simplification, consolidation, and categorization
of entries, as shown in Figure I.2. It does not allow the user to make specific selections,
only to group other selections. A KEYNAME may be specified here if all entries
in CATEGORY use the same one.
END CATEGORY is required for closure. Without it, System Policy Editor
does not accept the template. Each category listing creates a book icon in the System
Policy Editor, and the categories from COMMON.ADM are shown in Figure I.2.
Figure
I.2. Listed categories
in COMMON.ADM.
POLICY/END POLICY
The POLICY entry allows you to further classify the entries in System
Policy Editor, or to implement an individual policy. For further classification,
add POLICY or PART entries. The additional PART entries
create a deeper hierarchical list.
The POLICY entry creates a check box for selection that allows you turn
the POLICY on or off. The POLICY listings shown in Figure I.3 are
for Wallpaper and Color scheme.
Figure
I.3. Policies from
COMMON.ADM in System Policy Editor.
For policy implementation, add a KEYNAME (if not already done in CATEGORY),
VALUENAME, and other required entries for implementation (part type and
data).
END POLICY is required for closure. Without it, System Policy Editor
will not accept the template.
PART/END PART
The PART entry allows for multiple settings inside a single POLICY.
Each PART entry must include a KEYNAME, VALUENAME, and
entries. The KEYNAME may be specified at higher levels, thus inherited by
the PART.
The PART may also include a part type. The default type is a CHECKBOX,
so if another is not listed in the PART, System Policy Editor creates a
check box. Figure I.4 shows several PARTs under one POLICY.
Figure
I.4. Listed parts
in COMMON.ADM.
END PART is required for closure. Without it, System Policy Editor does
not accept the template.
KEYNAME
The KEYNAME is a critical function that determines where the change in
the Registry occurs. It can be listed in the PART, the POLICY,
or the CATEGORY, depending on the scope of the changes. For example, if
a single KEYNAME is used for all items in a CATEGORY, KEYNAME
is listed in CATEGORY. If different POLICY entries use different
KEYNAMEs, the KEYNAMEs are listed under POLICY instead
of CATEGORY. The same holds true for PART. It is quite rare, though,
for the KEYNAME to be listed under PART, but it can be.
When you list the KEYNAME, start at the key below the handle key but
do not include the backslash. The correct listing in the .ADM file for HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\
System\CentralProcessor\0 is HARDWARE\DESCRIPTION\System\CentralProcessor\0.
Figure I.5 shows a similar KEYNAME.
Figure
I.5. Using a KEYNAME
in COMMON.ADM.
If the KEYNAME does not exist, System Policy Editor creates it.
If the KEYNAME entered does not work in the Registry, no error is recorded.
It simply does not work.
VALUENAME
VALUENAME is the actual location where the data is entered. If it is
not present, it is added by System Policy Editor upon implementation of the policy.
A VALUENAME has been highlighted in Figure I.6.
Figure
I.6. Using VALUENAME
in COMMON.ADM.
I f the VALUENAME entered does not work in the Registry, no error is recorded.
It simply does not work.
The default value type is REG_SZ. To enter data as binary, use the NUMERIC
designation with VALUE.
NUMERIC
The addition of the NUMERIC modifier after VALUE forces the
data to be entered as a number rather than text. It changes the value type in the
Registry to binary and converts the number automatically from decimal to binary values.
; (Comment)
The semicolon (;) allows the writer of the template file to include remarks
or comments in the .ADM file without them showing in the System Policy Editor.
A hard return at the end of a line ends the remark.
STRINGS
Labels for CATEGORY, POLICY, and PART entries may be
made with text in quotation marks, or by the addition of STRINGS. The STRINGS
listing in the policy is shown with double exclamation marks (!!). STRINGS
cannot contain spaces, but can be as long as desired.
An example of a string entry would be POLICY !!RemoteUpdate in COMMON.ADM.
Rather than list the text as "Remote Update" on the POLICY
line, Microsoft chose to use the double exclamation (!!) and list the actual text
in the [STRINGS] section of COMMON.ADM. Figure I.7 shows text from
[STRINGS] as it will appear in the System Policy Editor user interface.
The replacement for the STRINGS is listed at the bottom of the template
file under the [STRINGS] heading. Doing this allows the multiple use of
strings, and reduces the typing required at each CATEGORY, POLICY,
or PART.
Figure
I.7. The !!RemoteUpdate
string in COMMON.ADM as changed in System Policy Editor.
PART Types
Inside a POLICY or PART, several different types of entries
are available. Each has specific limitations, and each gives a different type of
entry for the value.
CHECKBOX
A CHECKBOX part type allows the activation or deactivation of policies.
If the box is checked, the VALUEON value is entered. If the box is empty,
the VALUEOFF value is entered. If the box is grayed, the entry is ignored.
Whatever is currently in the Registry remains.
CHECKBOX is the most common type of PART, and is shown in Figure
I.8.
Figure
I.8. CHECKBOX
entries from COMMON.ADM, as displayed in the System Policy Editor.
VALUEON
When CHECKBOX is selected, the string immediately following VALUEON
is entered in the value.
VALUEOFF
When CHECKBOX is deselected, the string immediately following VALUEOFF
is entered in the value.
EDITTEXT
Choosing an EDITTEXT type of PART allows the entry of alphanumeric
text strings for the Registry. Figure I.9 shows a text box waiting for an entry.
Figure
I.9. An EDITTEXT
entry from COMMON.ADM, as displayed in the System Policy Editor.
DEFAULT
Using a DEFAULT setting fills the text box with the default entry, but
it can be typed over at any time. The syntax for this setting is DEFAULT data.
If you do not have a DEFAULT entry, the text box is initially empty.
MAXLEN
Set the maximum length of the string with MAXLEN. The syntax is MAXLEN
value, with the limits of 1-255 characters. For example, if you set MAXLEN
128, the maximum length of the string would be 128 characters.
REQUIRED
REQUIRED specifies that an entry is mandatory for the part to be enabled.
LISTBOX
You can add a series of entries with a LISTBOX. A LISTBOX entry
will create multiple REG_SZ entries in the Registry. With no modifier, LISTBOX
replaces all the current entries in the key. With the modifier ADDITIVE
used, new entries from the System Policy Editor will be displayed in addition to
the current entries in the key. The complex entry box created by LISTBOX
is shown in Figure I.10.
Figure
I.10. An LISTBOX
entry from COMMON.ADM, as displayed in the System Policy Editor.
VALUENAME
This VALUENAME is different than the one that determines where data is
entered. This entry gives a name to the LISTBOX.
ADDITIVE
LISTBOX entries override current data in the Registry. If you add this
modifier, entries are appended onto the end of whatever is currently in the value.
EXPLICITVALUE
Two columns of data are created with EXPLICITVALUE. The first column
holds the item name; the second holds the item data. Without this modifier, the VALUENAME
and the value data are the same.
DROPDOWNLIST
A DROPDOWNLIST gives the user a list of entries from which to choose.
It eliminates typing errors and allows only specific entries, as shown in Figure
I.11.
Figure
I.11. A DROPDOWNLIST
entry from COMMON.ADM, as displayed in the System Policy Editor.
ITEMLIST/END
ITEMLIST
ITEMLIST contains all the entries that appear in the DROPDOWNLIST.
After all items have been listed, use END ITEMLIST to close the list (required).
Each item consists of a NAME and a VALUE or ACTIONLIST.
NAME
The NAME is the text that appears in the DROPDOWNLIST.
VALUE
Use the VALUE parameter for the actual entry if the name is chosen in
the list. Remember, if it is a binary or numeric value, use VALUE NUMERIC.
ACTIONLIST/END
ACTIONLIST
ACTIONLIST is an alternative to a single-entry list. ACTIONLIST
starts a list of actions if the selection is made. ACTIONLIST is used with
the NAME entry. If NAME is chosen, ACTIONLIST is activated.
This requires an END ACTIONLIST to conclude the list.
REQUIRED
REQUIRED specifies that an entry is mandatory for the part to be enabled.
COMBOBOX
A COMBOBOX works like a combination of a DROPDOWNLIST and an
EDITTEXT box. The items show in a list, and the user can choose one, or
can add one of his own. It is more flexible than DROPDOWNLIST. If additional
entries are required in the future, using a COMBOBOX means you are not required
to edit the template file. Figure I.12 shows a COMBOBOX.
Figure
I.12. A COMBOBOX
entry from ADMIN.ADM, as displayed in the System Policy Editor.
ITEMLIST/END
ITEMLIST
The ITEMLIST contains all the entries that appear in the COMBOBOX.
After all the items have been listed, use END ITEMLIST to close the list
(required). Each item consists of a NAME and a VALUE or ACTIONLIST.
NAME
The NAME is the text that appears in the COMBOBOX.
VALUE
Use the VALUE parameter for the actual entry if the name is chosen in
the list. Remember, if it is a binary or numeric value, use VALUE NUMERIC.
ACTIONLIST/END
ACTIONLIST
ACTIONLIST is an alternative to a single-entry list. ACTIONLIST
starts a list of actions if the selection is made. ACTIONLIST is used with
the NAME entry. If NAME is chosen, ACTIONLIST is activated.
This requires an END ACTIONLIST to conclude the list.
DEFAULT
Using a DEFAULT setting fills in the text box with the default entry,
but it can be typed over at any time. The syntax for this setting is DEFAULT
data. If you do not have a DEFAULT entry, the text box is initially
empty.
MAXLEN
Set the maximum length of the string with MAXLEN. The syntax is MAXLEN
value, with the limits of 1-255 characters. For example, if you set MAXLEN
128, the maximum length of the string would be 128 characters.
REQUIRED
REQUIRED specifies that an entry is mandatory for the part to be enabled.
SUGGESTIONS/END
SUGGESTIONS
You can specify a list of SUGGESTIONS in the COMBOBOX. All items
in the list are separated only by a space. If a single item has a space in it, enclose
it in quotes.
End the list with END SUGGESTIONS.
NUMERIC
The NUMERIC entry is very similar to EDITTEXT in that the user
types a specific value. However, it is always a number instead of text.
DEFAULT
Using a DEFAULT setting fills in the entry box with the default entry,
but it can be typed over at any time. The syntax for this setting is DEFAULT
data. If you do not have a DEFAULT entry, the box is initially empty.
MAX
This setting sets the maximum length of the entry (not the maximum value). The
syntax is MAX value (with the default of 9999 characters).
MIN
This setting sets the minimum length of the entry (not the minimum value). The
syntax is MIN value (with the default of 0 characters).
REQUIRED
REQUIRED specifies that an entry is mandatory for the part to be enabled.
This overrides a MIN value of 0.
SPIN
Using this modifier increments the entry to the Registry every time a user makes
an entry. The syntax is SPIN value (which increments the amount by the value).
For example, SPIN 5 increments the value by 5 for every entry; SPIN
1 increments it by 1; SPIN 0 turns it off.
TXTCONVERT
If you want to enter a value as text instead of a number, use TXTCONVERT.
ACTIONLISTON/END ACTIONLISTON
This setting allows you to set a list of items to occur simultaneously when an
option is turned ON. Make one setting in the System Policy Editor, and it
makes a number of settings for you.
ACTIONLISTOFF/END ACTIONLISTOFF
The direct opposite of ACTIONLISTON, ACTIONLISTOFF allows you
to set a list of items to occur simultaneously when an option is turned OFF.
Make one setting in the System Policy Editor, and it makes a number of settings for
you. Figure I.13 illustrates the use of ACTIONLISTON and ACTIONLISTOFF.
Figure
I.13. ACTIONLISTON
and ACTIONLISTOFF allow for sweeping updates of the Registry.
©Copyright, Macmillan Computer Publishing. All rights reserved.
Wyszukiwarka
Podobne podstrony:
phpdig doc apiWindows 2000 NT Native API Leksykonduron e api cj 4 plstream common apiphpdig doc apiAPIAPI users guideĆwiczenie 7 Identyfikacja bakterii (metoda klasyczna i testy API)client block apit p apiapiFacebook tworzenie aplikacji zezwolenia i korzystanie z APIapi graph indexApi Life Varwłaściciel@api[1]api system indexapiwięcej podobnych podstron