Customizing Windows


Customizing Windows

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. contains. (See Chapter 5, “Mapping Tweak UI.”) Figure 7-6 shows what this administrative template looks like in Group Policy Editor.

Listing 7-17 Tweakui.adm

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 XPthinks 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

figure 7-6 notice the warning that the setting will tattoo the registry.

Figure 7-6 Notice the warning that the setting will tattoo the registry.

This administrative template does not contain proper policies. The settings aren't in an official policy branch in the registry, so Windows can't manage them. That means that if you remove the policy, the setting remains. The change is permanent. By default, Group Policy Editor does not display unmanaged settings because they tattoo the registry–a side effect that you don't normally want to happen. In this case, I'm consciously choosing to tattoo the registry in order 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. In Group Policy Editor, under Computer Configuration or User Configuration, right-click Administrative Templates, point to View, and then click Filtering.

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



Microsoft Windows Registry Guide
Microsoft Windows Registry Guide, Second Edition
ISBN: 0735622183
EAN: 2147483647
Year: 2003
Pages: 186

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