Template files allow you to add options to System Policy Editor quickly and easily. Writing the template files can be a little difficult, so I have included template files for most of the Registry changes made in the rest of the book. You will find each of these files in the CD-ROM kit that accompanies this book. Feel free to modify them to your needs and to use them to help manage your organization better.
In Windows NT, you can simply add extra template files to the System Policy Editor. In Windows 95, you will either need to append these files on the end of ADMIN.ADM or use them separately. I recommend testing them by using them separately first. Then, if you are satisfied with the results, you could append them onto the end of the ADMIN.ADM file.
Some of the settings regarding the interface changes do not lend themselves to be policies in System Policy Editor. Two examples are Force the Windows NT Screen Saver to Start During Logon and Change the Wallpaper that Appears at the Logon Screen. They are settings that apply to every user, and all the settings made in System Policy Editor configure settings to individual users. The Default User function in System Policy Editor applies the policy to each user individually, not the All Users Registry. Logon functions apply only to All Users. This template will work equally well for Windows 95 and Windows NT.
The filename on the CD-ROM that accompanies this book for the .ADM file created from the interface Registry entries is INTERFACE.ADM. Listing J.1 shows the contents of INTERFACE.ADM.
CLASS USER CATEGORY !!SPEED POLICY "Boost Menu Speed" KEYNAME "Control Panel\Desktop" PART "Enter menu speed (1-10000, lower is faster)" EDITTEXT VALUENAME MenuShowDelay END PART END POLICY POLICY "Boost Window Speed" KEYNAME "Control Panel\Desktop\WindowMetrics" PART "I want faster windows" CHECKBOX VALUENAME MinAnimate VALUEON "0" VALUEOFF "1" END PART END POLICY END CATEGORY CATEGORY !!LOOK POLICY !!MOVE KEYNAME "Control Panel\Desktop" PART "Horizontal Value (from left edge, in pixels)" EDITTEXT VALUENAME WallPaperOriginX END PART PART "Vertical Value (from top edge, in pixels)" EDITTEXT VALUENAME WallPaperOriginY END PART END POLICY POLICY !!PRESERVE KEYNAME Software\Microsoft\Windows\CurrentVersion\Policies\Explorer VALUENAME NoSaveSettings VALUEON "0" VALUEOFF "1" END POLICY END CATEGORY CATEGORY !!SHUTDOWN POLICY "Specify Shutdown Setting" KEYNAME Software\Microsoft\Windows\CurrentVersion\Explorer PART "Select preferred shutdown option" DROPDOWNLIST VALUENAME "Shutdown Setting" ITEMLIST NAME "Shut down the computer?" VALUE NUMERIC 1 NAME "Restart the computer?" VALUE NUMERIC 2 NAME "Close all programs and log on Âas a different user?" VALUE NUMERIC 3 END ITEMLIST END PART END POLICY END CATEGORY CLASS MACHINE CATEGORY !!ICON POLICY "Remove shortcut arrows from icons" KEYNAME SOFTWARE\Classes\Lnkfile ACTIONLISTON VALUENAME IsShortcut VALUE NUMERIC 0 END ACTIONLISTON END POLICY END CATEGORY CATEGORY !!SHELL POLICY "Use Program Manager as the Shell" KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" VALUENAME Shell VALUEON "progman.exe" VALUEOFF "explorer.exe" END POLICY POLICY "Use the old Task List" KEYNAME "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" VALUENAME TaskMan VALUEON "taskman.exe" VALUEOFF "taskmgr.exe" END POLICY END CATEGORY [STRINGS] SPEED="Enhance Interface Performance" LOOK="Change Desktop Appearance" MOVE="Move the wallpaper from the center of the screen" PRESERVE="Preserve Desktop Settings at Exit" SHUTDOWN="Shutdown Settings" ICON="Desktop Icons" SHELL="Shell"
The resulting System Policy Editor entries are shown in Figures J.1 through J.5.
Figure J.1 shows the result of the MenuShowDelay function in Listing J.1. The !!Speed string (as a category name) is replaced by the Enhance Interface Performance text in Figure J.1.
Improving performance is also the goal of the MinAnimate portion of the template in Listing J.1. Figure J.2 shows the result of the template in the System Policy Editor screen.
Figure J.1. Boosting the menu speed with System Policy Editor.
Figure J.2. Removing the window animation with System Policy Editor.
If your icons get in the way of your wallpaper, you
can move the wallpaper with WallpaperOriginX
and WallpaperOriginY Registry settings. The settings are included in Listing
J.1, and the resulting policy is shown in Figure J.3.
Every time you exit Windows, you can set it to the same option with the Shutdown setting in the System Policy Editor. The ITEMLIST entry in Listing J.1 produces the lists shown at the bottom of Figure J.4.
The CLASS MACHINE settings in INTERFACE.ADM create the settings for the computer, as shown in Figure J.5.
Figure J.3. Offset the wallpaper for better viewing.
Figure J.4. Set the shut-down settings for consistency.
Figure J.5. Computer-based settings allow system customization.
The usable changes for NT Workstation are listed in this file, called WS.ADM on the CD-ROM that accompanies this book. With that information, you can effectively create additional template files that configure NWLink and TCP/IP settings across the network.
There are no settings for CLASS USER in this template, only for the computer. Default user is blank unless you add other templates that have user settings. The Registry changes for the NT Workstation are included in the WS.ADM file, as shown in Listing J.2.
CLASS MACHINE CATEGORY "Registry" POLICY "Restrict Access to Registry" KEYNAME SYSTEM\CurrentControlSet\Control\SecurePipeServers\WinReg VALUENAME Description VALUEON "Registry Server" VALUEOFF "" END POLICY END CATEGORY CATEGORY "Browsing" POLICY "Master Browser" KEYNAME SYSTEM\CurrentControlSet\Services\Browser\Parameters PART "This system should:" DROPDOWNLIST VALUENAME MaintainServerList ITEMLIST NAME "Be automatically selected" VALUE "Auto" NAME "NEVER be a Master Browser" VALUE "No" NAME "ALWAYS be the Master" VALUE "Yes" END ITEMLIST END PART END POLICY END CATEGORY CATEGORY "TCP/IP" POLICY "Domain Name Service" KEYNAME SYSTEM\CurrentControlSet\Services\Tcpip\Parameters PART "DNS Domain Name" EDITTEXT VALUENAME Domain END PART END POLICY END CATEGORY
In System Policy Editor, the WS.ADM file creates policies that are easy to understand and set, as shown in Figures J.6 and J.7.
Figure J.6. Registry access and browse list restrictions for the Workstation.
Figure J.7. Changing the DNS domain name for systems on the network quickly and easily.
These computer-based settings are for servers and server functions on Workstation. In your system, you can also add other settings if you know your network card and drivers. Listing J.3 lists the contents of the SERVER.ADM file.
CLASS MACHINE CATEGORY "Performance" POLICY "Server Thread Priority" KEYNAME SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters PART "Server Thread priority:" DROPDOWNLIST VALUENAME Threadpriority ITEMLIST NAME "same as background" VALUE NUMERIC 0 NAME "same as foreground" VALUE NUMERIC 1 NAME "one above foreground" VALUE NUMERIC 2 END ITEMLIST END PART END POLICY END CATEGORY CATEGORY "Printing" POLICY "Disable Print Notification" KEYNAME SYSTEM\CurrentControlSet\Control\Print\Providers VALUENAME NetPopup VALUEON NUMERIC 0 VALUEOFF NUMERIC 1 END POLICY END CATEGORY CATEGORY "Browsing" POLICY "Hide system from browse list" KEYNAME SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters VALUENAME Hidden VALUEON NUMERIC 1 VALUEOFF NUMERIC 0 END POLICY END CATEGORY
The settings from SERVER.ADM are shown in Figures J.8 and J.9. There are no user settings because a server is always a server, regardless of which user logs on to the system.
Figure J.8. Changing the thread priority for the Server service.
Figure J.9. Printing and browsing optional settings for servers.
General networking settings allow access to different networking functions across all protocols. The biggest challenge with settings in relation to the network is the requirement to know the network card. Without that information, NETWORK.ADM has only a few, but very powerful, settings. Listing J.4 shows the contents of NETWORK.ADM.
CLASS MACHINE CATEGORY "Connection" POLICY "Allow Ghosted Connections" KEYNAME "SYSTEM\CurrentControlSet\Control\NetworkProvider" VALUENAME RestoreConnection VALUEON NUMERIC 0 VALUEOFF NUMERIC 1 END POLICY END CATEGORY CATEGORY "Installation" POLICY !!INSTALL KEYNAME SOFTWARE\Microsoft\Windows\CurrentVersion VALUENAME AppInstallPath VALUEON "\\SERVER1\WINNT\INF\APPS.INF" VALUEOFF "" END POLICY END CATEGORY [STRINGS] INSTALL="Allow network installation of applications"
Figure J.10 shows the settings in System Policy Editor from NETWORK.ADM that allow you to enhance networking functions.
Figure J.10. Networking options with NETWORK.ADM.
Use these files, modify them for your own use, and use them to learn more about creating
your own custom policy files. Good luck!
© Copyright, Macmillan Computer Publishing. All rights reserved.