这里是普通文章模块栏目内容页
封装windows镜像时sysprep可用重置次数超过系统限制的解决办法

How to fix SysPrep Fatal error "dwRet = 31" and Sysprep your machine more than three (3) times.

 

Step 1. Modify SysprepStatus, CleanupState & SkipRearm Registry Values

1. Open Windows Registry Editor. To do that:

  1. Press "WindowsImage-201_thumb_thumb_thumb_thumb1_t  + "R" keys to load the Run dialog box.
  2. Type "regedit" and press Enter.

registry-editor-command

 

 

 

2. Inside Windows Registry, navigate (from the left pane) to this key:

HKEY_LOCAL_MACHINE\System\Setup\Status\SysprepStatus

sysprepstatus

 

 

3a. At the right pane change the CleanupState value to 2 and click OK.

SysPrep dwRet 31

 

3b. Change the GeneralizationState value to 7 and click OK.

CleanupState

 

 

4. At the left pane navigate to the following key:

HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\SoftwareProtectionPlatform

sysprep more than trhee (3) times

 

 

5. At the right pane, change the SkipRearm value to 1.

skiprearm

 

6. Close Registry Editor.

 

Step 2. Uninstall and then re-install the MDSTC service (Microsoft Distributed Transaction Coordinator)

 

1. Open command prompt with Administrative privileges. To do that:

In Windows 7 & Vista go to:

  • Start > All Programs > Accessories
  • Right-click to "Command prompt" item and choose "Run as administrator".

command prompt run as administrator

 

In Windows 10, 8 & 8.1:

  • Right-click at the screen's bottom-left corner (Start menu) and from the pop-up menu, choose "Command Prompt (Admin)".

windows-8-admininstator-command-prompt

 

2. In command prompt window type the following command and press Enter to uninstall the MSDTC service:

msdtc –uninstall

msdtc –uninstall

 

3. Then re-install the MSDTC service by typing the following command (and press Enter).

msdtc –install

msdtc –install

 

4. Close command prompt.

 

Step 3. Delete the Panther folder.

1. Open Windows Explorer and navigate to C:Windows\System32\sysprep folder.

2. Delete (or Rename) the Panther folder.

sysprep-panther

 

3. Now run sysprep again. Sysprep should run now without any problems.