GuiRunOnce in sysprep.inf not working in Windows POSReady


On a device running Windows Embedded POSReady with FBWF and Registry Filter enabled, the commands listed under the GuiRunOnce field in a sysprep.inf file may not run on first boot after sysprep is performed.

This may be due to the missing registry key HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce.


The Registry key may be missing because its not getting written to the Registry database. When the "Registry Filter Driver" service is enabled, it can prevent a Registry key from being written to the Registry database. The "Registry Filter Driver" is used to protect the registry database of an Embedded device. It prevents a user from making changes to the registry of a device. "Registry Filter Driver" service supplements the “File Based Write Filter” service and both should be turned off to allow the Registry key to be written to the Registry database. Unfortunately, both "Registry Filter Driver" service and "File Based Write Filter" (FBWF) service are not visible in the "Services" MMC snap-in. To control their settings, related Registry settings may need to be modified.


The following Registry key changes may be required prior to running Sysprep file, to enable GUIRunOncen commands to work in Sysprep.ini file. The Registry change disables "Registry Filter Driver" service and the FBWF service. Start the Registry Editor (Go to start, Run, type Regedit.exe, press enter) and create the following regnodes if not present, or if present set the values as outlined below.



Now, Sysprep can be run.

"Registry Filter Driver" service and the FBWF service can be enabled by making the following Registry changes:



Important: This step directs you to modify the registry. However, serious problems might occur if you modify the registry incorrectly. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

KB322756 How to back up and restore the registry in Windows

Adding these registry keys can be done several ways. You can use RegEdit, as shown in the example below. Alternatively you can also use Registry Entries (.reg) files to remotely distribute registry changes to several Windows-based computers. When you run a .reg file, the file contents merge into the local registry. Therefore, you must distribute .reg files with caution. The following article provides advanced information on the Registry with several editing methods described, including Regedit and .reg files:

KB256986 Windows registry information for advanced users

Example using Regedit:

  1. Click on the Start menu, Select 'Run...'
  2. Type: Regedit
  3. Press the Enter key or click OK
  4. Add the following keys to the Software section of the Registry:

    [HKEY_LOCAL_MACHINE\software\Microsoft\Windows Embedded POSReady]

More Information

"Registry Filter Driver" service is a service complimentary to a "File Based Write Filter" service and both should be turned off for a Sysprep scenario. Registry Filter Driver" service and "File Based Write Filter" service are not visible from "Services" MMC snap-in. This requires to control service start type through Registry manipulation (either directly or through REG files).