4.4.3 COMBOBOX
This
PART type displays a combo box. It accepts the same options as
EDITTEXT, as well as the SUGGESTIONS option, which begins a list of
suggestions to be placed in the drop-down list. The suggestions are
separated by spaces and must be enclosed in
quotation marks (“) when a value includes spaces. If a suggestion name
includes white space, it must be enclosed in quotation marks. The list
ends with END SUGGESTIONS.
For
example, you can establish a list of screen saver names so that the
administrator does not have to know the names of the screen savers.
Here is a snippet of the original .adm template code for the screen
saver file name and the modified syntax using the COMBOBOX syntax:
POLICY !!ScreenSaverFilename
KEYNAME "Software\Policies\Microsoft\Windows\Control Panel\Desktop"
PART !!ScreenSaverFilename EDITTEXT
VALUENAME "SCRNSAVE.EXE"
END PART
END POLICY
Here’s an updated version of the screen saver option with a COMBOBOX.
POLICY !!ScreenSaverFilename
KEYNAME "Software\Policies\Microsoft\Windows\Control Panel\Desktop"
PART !!Screensaverpicker COMBOBOX
VALUENAME "SCRNSAVE.EXE"
SUGGESTIONS
C:\WINNT\System32\ssstars.scr
C:\WINNT\System32\ssbezier.scr
C:\WINNT\System32\ssflwbox.scr
END SUGGESTIONS
END PART
END POLICY
The resulting GPME text for this new syntax appears as shown Figure 3.
Tip
If
you use the STRINGS syntax for the name of the COMBOBOX, the entry can
be just a single word, where the variable is an entire sentence. This
approach is useful, because if you have more than one word within the
quotation marks, you will receive an error when you attempt to import
the administrative template into the GPO. Additional syntax that you
can use in conjunction with COMBOBOX includes KEYNAME, VALUENAME,
DEFAULT, SUGGESTIONS, REQUIRED, MAXLENTGH, OEMCONVERT, END,
EXPANDABLETEXT, NOSORT, and CLIENTEXT. |