Registry Filter Tips
Windows XP Embedded Service Pack 2 Feature Pack 2007 introduces the new Embedded Enabling Feature Registry Filter that persists certain registry keys, for example, those for Terminal Services Client Access License (TSCAL) and Domain Secret Key. Since the introduction of the Registry Filter, you’ve asked us if the Registry Filter could persist other registry keys in addition to the aforementioned. We’re excited to tell you, “Yes, the Registry Filter can persist other registry keys.” However, we must warn you that we haven’t yet thoroughly tested the Registry Filter persisting every registry key other than those for TSCAL and Domain Secret Key. We humbly ask that you please use the Registry Filter to persist other registry keys with an open mind and send us feedback so that we can improve the feature.
With that said, here’s how you can use the Registry Filter to persist other registry keys.
First, add the Registry Filter to your configuration in Target Designer.
-
Switch to the Tree View.
-
Add Embedded Enabling Feature | Registry Filter to the configuration

Then, add Extra Registry Data for the Registry Filter. There are three items to add: ClassKey, FileNameForSaving, and RelativeKeyName.
ClassKey
-
Check the menu item View | Resources to show the configuration’s Extra Registry Data.
-
Right-click Extra Registry Data and select Add…
-
Set Root to HKEY_LOCAL_MACHINE.
-
Set Key name to SYSTEM\CurrentControlSet\Services\regfilter\Parameters\MonitoredKeys\<number>, where <number> is 2 or greater – 0 and 1 are used by TSCAL and Domain Secret Key
-
Set Value name to ClassKey
-
Set Type to REG_SZ
-
Set Value to HKLM
-
Click OK

FileNameForSaving
- Check the menu item View | Resources to show the configuration’s Extra Registry Data
- Right-click Extra Registry Data and select Add…
- Set Root to HKEY_LOCAL_MACHINE
- Set Key name to SYSTEM\CurrentControlSet\Services\regfilter\Parameters\MonitoredKeys\<number>, where <number> is 2 or greater – 0 and 1 are used by TSCAL and Domain Secret Key
- Set Value name to FileNameForSaving
- Set Type to REG_SZ
- Set Value to <filename>, where <filename> is the name of the file in which this registry key will be saved on the system drive
- Click OK

RelativeKeyName
- Check the menu item View | Resources to show the configuration’s Extra Registry Data
- Right-click Extra Registry Data and select Add…
- Set Root to HKEY_LOCAL_MACHINE
- Set Key name to SYSTEM\CurrentControlSet\Services\regfilter\Parameters\MonitoredKeys\<number>, where <number> is 2 or greater – 0 and 1 are used by TSCAL and Domain Secret Key
- Set Value name to RelativeKeyName
- Set Type to REG_SZ
- Set Value to <key>, where <key> is the registry key to persist
- Click OK

Your configuration’s Extra Registry Data will look similar to what’s below.

Now all that’s left is running the dependency check, resolving all dependency errors, and building your image.
But then, you might wonder, “That’s great! But… can I add registry keys to be persisted at runtime?” “Yes, you can!”
The Registry Filter is designed for use with the writer filters such as Enhanced Write Filter and File Based Write Filter. Adding registry keys to be persisted at runtime, then, is a three step procedure.
-
Disable the write filter
-
Add registry keys to be persisted to HKLM\SYSTEM\CurrentControlSet\Services\regfilter\Parameters\MonitoredKeys\<number>\ClassKey, …\<number>\FileNameForSaving, and …\<number>\RelativeKeyName
-
Enable the write filter
We hope you find the Registry Filter useful, and we again humbly ask you to send us feedback so that we can improve the feature.
- Cuong