大网数据广告活动
启动与系统组件

commands under GuiRunOnce doesn't run

· 52CE 我爱测

This article provides resolutions for the problem where the commands listed under the GuiRunOnce field in a sysprep.inf file may not run on first boot after sysprep is performed.

This article helps you resolve the problem where the commands listed under the GuiRunOnce field in a sysprep.inf file may not run on first boot after sysprep is performed.

Original product version:   File Based Write Filter, Windows Embedded POSReady
Original KB number:   2390828

Symptoms

On a device running Windows Embedded POSReady with File Based Write Filter (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.

Cause

The Registry key may be missing because it's 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 FBWF 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 FBWF service are not visible in the "Services" MMC snap-in. To control their settings, related Registry settings may need to be modified.

Resolution

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.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RegFilter] "Start"=dword:00000004

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FBWF] "Start"=dword:00000004

Now, Sysprep can be run.

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

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RegFilter] "Start"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FBWF] "Start"=dword:00000000

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, see 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:

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] "Version"=(REG_SZ)"2.0"

More information

Registry Filter Driver service is a service complimentary to an FBWF service and both should be turned off for a Sysprep scenario. Registry Filter Driver service and FBWF 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).

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 09/02/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。