Solved Fatal error when running Sysprep

jbusby

New member
Local time
2:47 AM
Messages
5
Hi all,

I am trying to run Sysprep on a custom image that I have created. I ran the sysprep.exe from c:\Windows\System32\sysprep and used the OOBE and Generalize commands. I then selected shutdown for once the sysprep was complete.

After clicking on Ok the kick off the sysprep, almost immediately an error occurred. The error read:

"A fatal error occurred while trying to sysprep the machine."

Clicking Ok on the message simply takes me back to the sysprep folder with everything as it was.

After reading various forums, websites, blogs etc I have already tried the following suggestions but to no joy:

- stop the Windows Media Player Network Sharing service
- change the HKLM\System\Setup\Status\SysprepStaus registry file but amending the CleanupState to 2 and the GeneralizationState to 7
- unplug the network cable
- uninstall internet explorer


A lot of other suggestions were that I may have exceeded the realm count, which is not the case as this was a clean installation of windows only yesterday using the cd media.

Here are the sysprep log files (found in the c:\windows\system32\sysprep\panther folder)

setupact.log
2013-12-11 16:03:03, Info SYSPRP ========================================================
2013-12-11 16:03:03, Info SYSPRP === Beginning of a new sysprep run ===
2013-12-11 16:03:03, Info SYSPRP ========================================================
2013-12-11 16:03:03, Info [0x0f004d] SYSPRP The time is now 2013-12-11 16:03:03
2013-12-11 16:03:03, Info [0x0f004e] SYSPRP Initialized SysPrep log at C:\Windows\System32\sysprep\Panther
2013-12-11 16:03:03, Info [0x0f0054] SYSPRP ValidateUser:User has required privileges to sysprep machine
2013-12-11 16:03:03, Info [0x0f007e] SYSPRP FCreateTagFile:Tag file C:\Windows\System32\sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
2013-12-11 16:03:04, Info [0x0f003d] SYSPRP WinMain: Displaying dialog box for user to choose sysprep mode...
2013-12-11 16:03:09, Info [0x0f004a] SYSPRP WaitThread:Entering spawned waiting thread
2013-12-11 16:03:09, Info SYSPRP SysprepSearchForUnattend: No unattend file was specified or located; skipping unattend generalize pass.
2013-12-11 16:03:09, Info [0x0f00ac] SYSPRP WinMain :Processing 'cleanup' external provider request.
2013-12-11 16:03:09, Info [0x0f006c] SYSPRP RunExternalDlls:Running DLLs listed in registry for phase 3
2013-12-11 16:03:09, Info [0x0f008a] SYSPRP RunRegistryDlls:Retrieved section name for this phase as Cleanup
2013-12-11 16:03:09, Warning [0x0f008f] SYSPRP RunRegistryDlls:Registry key is either empty or malformed: SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrepExternal\Cleanup
2013-12-11 16:03:09, Info [0x0f00ad] SYSPRP WinMain:Processing 'generalize' extrenal provider request.
2013-12-11 16:03:09, Info [0x0f006c] SYSPRP RunExternalDlls:Running DLLs listed in registry for phase 1
2013-12-11 16:03:09, Info [0x0f008a] SYSPRP RunRegistryDlls:Retrieved section name for this phase as Generalize
2013-12-11 16:03:09, Warning [0x0f008f] SYSPRP RunRegistryDlls:Registry key is either empty or malformed: SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrepExternal\Generalize
2013-12-11 16:03:09, Info [0x0f003f] SYSPRP WinMain:Processing 'cleanup' internal provider request.
2013-12-11 16:03:09, Info [0x0f006c] SYSPRP RunExternalDlls:Running DLLs listed in registry for phase 3
2013-12-11 16:03:09, Info [0x0f008a] SYSPRP RunRegistryDlls:Retrieved section name for this phase as Cleanup
2013-12-11 16:03:09, Info [0x0f008b] SYSPRP RunRegistryDlls:Found entrypoint in registry at SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrep\Cleanup\{67196725-a666-73a6-a048-412e48a3b856}; will try to launch 'C:\Windows\System32\spopk.dll,Sysprep_Clean_Opk'
2013-12-11 16:03:09, Info [0x0f0080] SYSPRP LaunchDll:Found 'C:\Windows\System32\spopk.dll,Sysprep_Clean_Opk'; executing it
2013-12-11 16:03:09, Info [0x0f0081] SYSPRP LaunchDll:Successfully executed 'C:\Windows\System32\spopk.dll,Sysprep_Clean_Opk' without error
2013-12-11 16:03:09, Info [0x0f008b] SYSPRP RunRegistryDlls:Found entrypoint in registry at SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrep\Cleanup\{1e7f4452-a4b4-5a32-d01e-70397b096ced}; will try to launch 'sqmapi.dll,SqmSysprepCleanup'
2013-12-11 16:03:09, Info [0x0f0080] SYSPRP LaunchDll:Found 'sqmapi.dll,SqmSysprepCleanup'; executing it
2013-12-11 16:03:09, Info [0x0f0081] SYSPRP LaunchDll:Successfully executed 'sqmapi.dll,SqmSysprepCleanup' without error
2013-12-11 16:03:09, Info [0x0f008b] SYSPRP RunRegistryDlls:Found entrypoint in registry at SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\SysPrep\Cleanup\{2c8a362b-4dc1-38b9-c4d8-ce732ddcc48e}; will try to launch 'C:\Windows\System32\wevtapi.dll,EvtIntSysprepCleanup'
2013-12-11 16:03:09, Info [0x0f0080] SYSPRP LaunchDll:Found 'C:\Windows\System32\wevtapi.dll,EvtIntSysprepCleanup'; executing it
2013-12-11 16:03:09, Error [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'C:\Windows\System32\wevtapi.dll,EvtIntSysprepCleanup', returned error code 4201[gle=0x00001069]
2013-12-11 16:03:09, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 4201[gle=0x00001069]
2013-12-11 16:03:09, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80071069[gle=0x00001069]
2013-12-11 16:03:15, Info [0x0f004c] SYSPRP WaitThread:Exiting spawned waiting thread
2013-12-11 16:03:15, Info [0x0f0052] SYSPRP Shutting down SysPrep log
2013-12-11 16:03:15, Info [0x0f004d] SYSPRP The time is now 2013-12-11 16:03:15

setuperr.log
2013-12-11 16:03:09, Error [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'C:\Windows\System32\wevtapi.dll,EvtIntSysprepCleanup', returned error code 4201[gle=0x00001069]
2013-12-11 16:03:09, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 4201[gle=0x00001069]
2013-12-11 16:03:09, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80071069[gle=0x00001069]


As mentioned, I have hit the web for answers using the error codes found in these log files but to no joy. Hopefully somebody may be able to help!

I have attached the log files and images of my sysprep settings along with error.

Thanks
James
 

Attachments

  • setupact.log
    setupact.log
    4.7 KB · Views: 14
  • setuperr.log
    setuperr.log
    519 bytes · Views: 47
  • error.jpg
    error.jpg
    46.8 KB · Views: 2
  • sysprep_settings.jpg
    sysprep_settings.jpg
    54 KB · Views: 2

My Computer

OS
Windows 7 Professional x64
Have you possibly upgraded your Windows 7 or done a repair install? Only a cleanly installed Windows 7 can be sysprepped.

You cannot sysprep if some of the below conditions is true:
  • Windows 7 is installed as an in-place upgrade on top of the Windows Vista
  • A lesser edition of Windows 7 is upgraded to a better edition using Windows Anytime Upgrade option (for example Home Premium to Professional)
  • Windows 7 has been repair installed, in other words an in-place upgrade installation has been made to same edition (for example Windows 7 Ultimate has crashed, user has used the repair installation method to fix it)
Kari
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Hi Kari,

No this was a complete fresh install whereby the HDD was formatted and partitioned and windows installed using the cd media.

I've managed to eventually sysprep the machine however I am not quite sure what the fix was! I had built an answer file to automate part of the install for things such as regional settings, computer name etc however upon trying to run a cmd line sysprep with the answer file this too failed and gave an error. After this running the sysprep using the GUI worked fine and i've now captured my image using imagex.

Thanks
James
 

My Computer

OS
Windows 7 Professional x64
It sounds like if sysprep did not find your answer file. Also your log indicates this:
2013-12-11 16:03:09, Info SYSPRP SysprepSearchForUnattend: No unattend file was specified or located; skipping unattend generalize pass.

I understand you know sysprep quite well, the below is for future readers of this thread:

It is extremely important to be careful and give Sysprep command correctly. To guarantee the best possible outcome the switches must be in correct order:
  1. Boot mode (AUDIT or OOBE)
  2. Generalize (if needed, can be left out)
  3. Shutdown options (Reboot, Shutdown or Quit)
  4. Unattend (Location of the Answer File, if none is used can be left out)
Following the above rules, the syntax is:
Code:
%windir%\system32\sysprep\sysprep.exe /BOOT MODE /GENERALIZE /SHUTDOWN OPTIONS /UNATTEND:LOCATION OF THE ANSWER FILE
An example command where we want to run sysprep, prepare for the OOBE boot, shutdown and where the answer file named MyAnswerFile.xml is located on the root of the drive X:
Code:
%windir%\system32\sysprep\sysprep.exe /oobe /generalize /shutdown /unattend:X:\MyAnswerFile.xml
It is also important to remember that the Sysprep command should be run on an elevated Command Prompt (run Command Prompt by right clicking it and selecting Run as administrator).

Kari
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Load a command prompt with admin rights and type "net stop WMPNetworkSvc", sysprep should run ok.
 

My Computer

Computer type
PC/Desktop
OS
Microsoft Windows 10 Professional / Windows 7 Professional
CPU
Intel i5-3570
Motherboard
Lenovo Mahobay
Memory
16GB DDR3
Graphics Card(s)
AMD Radeon HD 7850 2GB
Sound Card
(1) Realtek HD Audio (2) AMD HD Audio
Monitor(s) Displays
LG LS192WS
Screen Resolution
1440 x 900 @ 32bit color
Hard Drives
(1) SUV300S37A/120G (2) ST3500413AS SATA Disk Device AHCI mode enabled.
PSU
Corsair HX620
Case
Thermaltake V4 Black Edition
Cooling
Cooler Master Hyper 212 + Artic Silver 5 on CPU/GPU
Keyboard
Dell SK-8115
Mouse
Razer Copperhead with MAPED mat (awesome!)
Internet Speed
100 Mbps up/down
Browser
Chrome
Load a command prompt with admin rights and type "net stop WMPNetworkSvc", sysprep should run ok.

The OP had already tried that, it was not the reason for sysprep crashing. This quote from the original post:
After reading various forums, websites, blogs etc I have already tried the following suggestions but to no joy:

- stop the Windows Media Player Network Sharing service
- change the HKLM\System\Setup\Status\SysprepStaus registry file but amending the CleanupState to 2 and the GeneralizationState to 7
- unplug the network cable
- uninstall internet explorer
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Fixed

OldMX nailed it - as soon as I ran

net stop wmpnetworksvc

everything worked as it should. Thank you for the magic OldMX!! :thumbsup:
 

My Computer

OS
Windows 7 x64
Back
Top