Fatal error when running Sysprep


  1. Posts : 5
    Windows 7 Professional x64
       #1

    Fatal error when running Sysprep


    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
    Attached Thumbnails Attached Thumbnails Fatal error when running Sysprep-error.jpg   Fatal error when running Sysprep-sysprep_settings.jpg  
    Fatal error when running Sysprep Attached Files
      My Computer


  2. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #2

    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


  3. Posts : 5
    Windows 7 Professional x64
    Thread Starter
       #3

    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


  4. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #4

    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


  5. Posts : 687
    Microsoft Windows 10 Professional / Windows 7 Professional
       #5

    Load a command prompt with admin rights and type "net stop WMPNetworkSvc", sysprep should run ok.
      My Computer


  6. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #6

    OldMX said:
    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:
    jbusby said:
    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


  7. Posts : 2
    Windows 7 x64
       #7

    Fixed


    OldMX nailed it - as soon as I ran

    net stop wmpnetworksvc

    everything worked as it should. Thank you for the magic OldMX!!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:00.
Find Us