Customizing Windows XP

The key reason that power users want to create administrative templates is to customize settings that have no user interface. By creating an administrative template, you give those settings a user interface, preventing human error. The following listing is a sample administrative template that does just that. It defines a handful of custom settings that Tweak UI (see Chapter 5, "Mapping Tweak UI") contains. Figure 6-6 on page 180 shows what this administrative template looks like in the Group Policy editor.

click to expand
Figure 6-6: Notice the warning that says the setting will tattoo the registry.

Listing 6-17: Tweakui.adm

start example

 CLASS USER CATEGORY "Tweak UI Settings"   EXPLAIN "These are settings from Tweak UI."   CATEGORY "Mouse"     EXPLAIN "Settings that customize the mouse."     POLICY "Menu Show Delay"       EXPLAIN "Delay before Windows XP opens a menu when you point at it."       KEYNAME "Control Panel\Desktop"       PART "Menu Delay (milliseconds)" NUMERIC         MIN 0         MAX 65534         DEFAULT 400         TXTCONVERT         VALUENAME MenuShowDelay       END PART     END POLICY     POLICY "Drag Height and Width"       EXPLAIN "Number of pixels the mouse moves before Windows XP thinks you're dragging it."       KEYNAME "Control Panel\Desktop"       PART "Height" NUMERIC         MIN 0         MAX 16         TXTCONVERT         VALUENAME DragHeight       END PART       PART "Width" NUMERIC         MIN 0         MAX 16         TXTCONVERT         VALUENAME DragWidth       END PART     END POLICY   END CATEGORY   CATEGORY "Taskbar"     EXPLAIN "Settings that customize the taskbar."     POLICY "Balloon Tips"       EXPLAIN "Enable or disable balloon tips."       KEYNAME Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced       VALUENAME EnableBalloonTips       VALUEOFF NUMERIC 0       VALUEON NUMERIC 1     END POLICY     POLICY "Taskbar Grouping"       EXPLAIN "Control how buttons group on the taskbar."       KEYNAME Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced       PART Grouping DROPDOWNLIST         ITEMLIST           NAME "Group least used applications first" VALUE 0           NAME "Group applications with the mouse windows first" VALUE 1           NAME "Group applications with at least 2 windows" VALUE 2           NAME "Group applications with at least 3 windows" VALUE 3           NAME "Group applications with at least 4 windows" VALUE 4           NAME "Group applications with at least 5 windows" VALUE 5           NAME "Group applications with at least 6 windows" VALUE 6           NAME "Group applications with at least 7        windows" VALUE 7         END ITEMLIST         NOSORT         VALUENAME TaskbarGroupSize       END PART     END POLICY   END CATEGORY END CATEGORY 

end example

This administrative template does not contain proper policies. The settings aren't in an official policy branch in the registry, so Windows XP can't manage them. That means if you remove the policy, the setting remains. The change is permanent. By default, the Group Policy editor does not display unmanaged settings because they tattoo the registry—a negative side effect you don't normally want to happen. In this case, I'm consciously choosing to do this to provide a user interface for user preferences that don't normally have a user interface. In Group Policy editor, unmanaged settings have red icons rather than the normal blue icons. To display these settings, you must show unmanaged settings in Group Policy editor:

  1. Right-click Administrative Templates under Computer Configuration or User Configuration, point to View, and click Filtering.

  2. In the Filtering dialog box, clear the Only Show Policy Settings That Can Be Fully Managed check box.



Microsoft Windows XP Registry Guide
Microsoft Windows XP Registry Guide (Bpg-Other)
ISBN: 0735617880
EAN: 2147483647
Year: 2005
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net