16 August 2011

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

This occurs when a Windows 7 system has been sysprepped three times -- KB929828. To overcome this, you will need to do the following:

1) Inside the Sysprep Unattend.xml file located at c:\windows\system32\sysprep, delete skiprearm=1 from the section. In order to edit the Unattend.xml file, you will need to slave the HDD onto a working machine in order to have access to a text editor for editing the file.

2) Under HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\, set GeneralizationState to 7

3) From an administrative command prompt, type the following
msdtc -uninstall
msdtc -install

4) Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\, change SkipRearm to 1

5) disconnect the ethernet cable

6) Rerun the sysprep

45 comments:

  1. Thank you Mick!
    Cheers

    Francisco

    ReplyDelete
  2. Very nice, thanks

    ReplyDelete
  3. Great Post, do you have reset the reg key after creating the image?

    ReplyDelete
    Replies
    1. No, if it successfully sysprepped and you were able to capture an image, then there is nothing that has to be done with the reg key.

      Delete
  4. Great - I have been looking for a successful resolution to this problem for a very long time!!

    Thank you very much.

    ReplyDelete
  5. I love you already.... Thanks a lot for this article.

    ReplyDelete
  6. Thank you! Saved me the pain of rebuilding an image from scratch!

    ReplyDelete
  7. THANK YOU SO MUCH!!!

    Greetings from Cananda

    ReplyDelete
  8. I'm a bit confused with "delete 1 from the section" in the Unattended.xml file. What section are we talking?

    ReplyDelete
  9. Yes, I can't find that unattended.xml file either.

    ReplyDelete
  10. Cordell, sorry about the mixup. I recently hired a developer to update my blogs here to a more professional look and this part accidentally got removed. I readded the skiprearm=1 back. That was the missing portion.

    ReplyDelete
  11. Thanks a bunch!! This was preventing me from getting my image out to machines that needed it.



    Minnesota

    ReplyDelete
  12. you will need to slave the HDD onto a working machine in order to have access to a text editor for editing the file.

    ................How should i do this sir ??

    ReplyDelete
  13. It worked for me. Many Thanks!!

    ReplyDelete
  14. Here is a good tutorial on how to slave your HDD: http://www.ehow.com/how_6642534_install-slave-hard-drive.html

    ReplyDelete
  15. I am confused at the end, should i add skiprearm=1 or delete from Unattend.xml?
    My Unattend.xml file doesn't have line skiprearm=1.
    what to do, help pls.

    ReplyDelete
  16. It should be there in the unattend.xml file. I would add it in

    ReplyDelete
  17. thanks, works for me.

    ReplyDelete
  18. You are a genious. THANKS!!!!

    ReplyDelete
  19. Thanks your solution worked like a charm

    ReplyDelete
  20. You are a life saver, please take ALL the credits because you totally deserve it. Save me almost 4-5hours re-image task.Thanks.
    David U- Great Britain.

    ReplyDelete
  21. Found this 2 years later in Oct. 2013.......THANKS !

    ReplyDelete
  22. Thanks work for me. You are the best.

    ReplyDelete
  23. How about if it's a virtual machine? How can I slave its hard disk? Thanks!

    ReplyDelete
  24. Has anyone told you they love you today? Well I love you.

    ReplyDelete
  25. Hey there, ok everything makes sense to me but I don't have the unnattend.xml file at all. In my sysprep folder I have the sysprep.exe file, en-US folder (which has sysprep.exe.mui) and then the Panther folder which has diaper.xml, diagnosis.xml, setupact.log, and setuperr.log as well as the IE folder with contents of the same name. I have done a sysprep before and it has always worked. When I did it this time to a rebuilt machine (Asus 1201N with Win 7 HP 32 bit) sysprep encountered a fatal error on the first reboot after installing drivers, etc. Now I know it would normally do this after the third reboot (I have read online and tested it myself) must I just scrap this install and reinstall the OS?

    ReplyDelete
  26. It sounds like it may just need to be reinstalled

    ReplyDelete
  27. I cannot think of anyway to slave a VM. I would take this info and maybe ask in a microsoft forum. I don't use VMs a whole lot.

    ReplyDelete
    Replies
    1. You can "slave" the disk of a VM simply by taking the VM offline and mounting the VHD in the host OS.

      For non-virtual machines you don't even need to slave a disk, simply by booting to WindowsPE you can run notepad and edit the file from there.

      You can also just take ownership over the file and just start notepad with elevated permissions.

      Delete
  28. You are great!
    Thanks a lot!!! GrĂ cies

    Pep

    ReplyDelete
  29. For those talking about not having an "Unattend.xml" file, I didn't have one either and just followed the rest of the steps and it worked just fine. Thanks a bunch for the steps!

    ReplyDelete
  30. Sweet! Works for me, great job and thanks for sharing!
    Steven

    ReplyDelete
  31. Got it to work without step one, thank you so much

    ReplyDelete
  32. Just did on Windows 2008 R2. Worked fine. My image didn't have an "Unattend.xml" file.

    ReplyDelete
  33. Sadly, still does not work for me. Damn it.

    ReplyDelete
  34. Thank You, works on Windows 10 too.....

    ReplyDelete
  35. Thanks very much Mick, your post really helped pulled me out of a difficult situation.

    ReplyDelete
  36. i dont have that unattended xml file. i didnt do the slave drive part because of that. i did follow the other steps, but im still getting the fatal error.

    ReplyDelete
  37. thanks fam

    btw it still works on Windows 10, just skip the first step.

    ReplyDelete
  38. Ive done all the above - but still not working </3

    ReplyDelete
  39. Mick, Brilliant fixing! I will try it. Great article thanks and keep up the great work!

    ReplyDelete