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

Running Sysprep /generalize returns error

· 52CE 我爱测

Describes how to work around the issue that may occur if the Windows Software Licensing Rearm program has run more than three times in a single Windows image.

This article solves the issue that you can't run the System Preparation Tool (Sysprep) in Windows 7 by using the /generalize option.

Applies to:   Windows 7 Service Pack 1, Windows Server 2012 R2
Original KB number:   929828

Symptoms

When you try to run the Sysprep in Windows 7, and you use the /generalize option, you may receive this error message:

A fatal error occurred while trying to Sysprep the machine.

The Setuperr.log file may contain lines that resemble the following:

Error [0x0f0082] SYSPRP LaunchDll: Failure occurred while executing 'C:\Windows\System32\slc.dll, SLReArmWindows', returned error code -1073425657  
Error [0x0f0070] SYSPRP RunExternalDlls: An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = -1073425657  
Error [0x0f00a8] SYSPRP WinMain: Hit failure while processing sysprep generalize providers; hr = 0xc004d307

Note: The Setuperr.log file is located in the \Windows\System32\Sysprep\Panther folder.

Cause

This error may occur if the Windows Software Licensing Rearm program has run more than three times in a single Windows image.

Resolution

To resolve this issue, you must rebuild the Windows image.

Workaround

To work around this issue, use the <SkipRearm> setting in an XML answer file (Unattend.xml) to skip the Rearm process when you build the Windows image.

The following text is an example of an XML answer file for Windows 7:

<settings pass="generalize">
    <component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <SkipRearm>1</SkipRearm>
    </component>
</settings>

Note: You must make sure that the <SkipRearm> setting is removed from the final unattended file that is used to deploy computers in a production environment. If <SkipRearm> is not removed from the unattended file that is used to deploy computers in a production environment, the KMS current client count does not increase for new clients that are added to the network.

For more information about the skipRearm tag of Microsoft-Windows-Security-Licensing-SLC component, see SkipRearm.

For more information about skipRearm tag of Microsoft-Windows-Security-SPP component, see Microsoft-Windows-Security-SPP.

More information

The Windows Software Licensing Rearm program restores the Windows system to the original licensing state. All licensing and registry data related to activation is either removed or reset. Also, any grace period timers are reset.

To run the Rearm process in Windows 7, use one of the following methods:

  • Run Sysprep /generalize on the computers that are used to build the custom Windows image.
  • Run the Slmgr.vbs script in an elevated Command Prompt window. For example, run cscript c:\windows\system32\slmgr.vbs -rearm.

Note: Administrative credentials are required to run the Rearm process. The Rearm process can be run a maximum of three times in a Windows image.

Data collection

If you need assistance from Microsoft support, we recommend you collect the information by following the steps mentioned in Gather information by using TSS for deployment-related issues.

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
适用范围
- Supported versions of Windows Client · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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