Windows: Fatal error occurred while trying to sysprep the machine

Hi,

if use some Image technologies to deploy your Windows installation and your new images are based on older ones sysprep or you have installed Internet Explorer 10, sysprep eventually can fail.

This occurs when sysprep /generalize is applied 9 times against an Windows installation. The counter is stored in the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus]
"GeneralizationState"=dword:00000009

Microsoft sets the max count to 9 to prevent an Image from corruption.

Set the counter to 7 and sysprep should work again. But keep in mind the Microsoft KB article 🙂

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus]
"GeneralizationState"=dword:00000007

Also the Windows “Windows Media Player Network Sharing Service” must be stopped respective disabled.
sc config WMPNetworkSvc start= disabled

For more details view the sysprep logs
C:\Windows\Panther\UnattendGC\setupact.log
C:\Windows\Panther\UnattendGC\setuperr.log
C:\Windows\System32\sysprep\Panther\setupact.log
C:\Windows\System32\sysprep\Panther\setuperr.log

There is also a known issue with Windows 7 x64 and Internet Explorer 10. In C:\Windows\System32\sysprep\Panther\setuperr.log a message appears that sysprep cannot load iesysprep.dll:

SYSPRP LaunchDll:Could not load DLL C:\Windows\SysWOW64\iesysprep.dll

3 Registry Keys references to the wrong iesysprep.dll in syswow64 folder. To fix this take the ownership and apply FullPermissions for Administrators to these 3 Registry Keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Specialize
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Generalize
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup

Note: you can set the permission from command line with Microsofts subinacl. This tool is from the Windows Support tools for Windows Server 2003 but still works fine on Windows 7.
subinacl.exe /subkeyreg HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep /grant=administrators=f
If you prefer the graphical way you can use regedit.exe of course.
 

Add apply the following Registry file


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Specialize]
"{EC9FE15D-99DD-4FB9-90D5-676C338DC1DA}"="C:\\WINDOWS\\System32\\iesysprep.dll,Sysprep_Specialize_IE"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Generalize]
"{EC9FE15D-99DD-4FB9-90D5-CE53C91AB9A1}"="C:\\WINDOWS\\System32\\iesysprep.dll,Sysprep_Generalize_IE"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\Sysprep\Cleanup]
"{EC9FE15D-99DD-4FB9-90D5-5B56E42A0F80}"="C:\\WINDOWS\\System32\\iesysprep.dll,Sysprep_Cleanup_IE"

Michael

Advertisment to support michlstechblog.info

One thought on “Windows: Fatal error occurred while trying to sysprep the machine”

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.