By default Windows only allows you to run sysprep on an image 3 times.  Then Microsoft’s solution is to re-install and start a new image.  Well what happens if you need to update your image or make a change without having to go through the hassle of making your image exactly what you want?  Follow these steps:

    1. Start > Run > regedit
    2. HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus
      • Set the following DWORD values:
        • CleanupState: 0x00000002 (2)
        • GeneralizationState: 0x00000007 (7)
    3. Start > Run > msdtc -uninstall
    4. Start > Run > msdtc -install
    5. Restart your machine.

    You should now be able to run sysprep! W00t!

    – Harry Caskey

    Posted by Harry Caskey @ 19:04

    Tags: ,

4 Comments to How to run sysprep more than 3 times

  • Rich Bailey says:

    I haven’t tried this yet but if it works I owe you big time. THANK YOU!!

  • Harry Caskey says:

    Hi Rich,

    This should work, please let me know if you have any questions!
    -Harry Caskey

  • John Ducote says:

    I have been fighting this problem for a week. I tried your solution and it didn’t work.
    My reg entries are correct. I ran the uninstall and reinstall of msdtc, then rebooted.Does it take long for the uninstall to finish? I waited a bit and did not get an error or anything telling me it was completed. Anyway to tell if it was successful?
    After performing your fix, syspreping and then rebooting the following happens”
    On the first reboot I get an error that “windows cannot be configured for your hardware”
    I then reboot and then get: Windows could not complete the installation”

    Any help would be appreciated

  • Harry Caskey says:

    (Sorry for the delay) Hmmm this sounds like there is another issue going on here other than with the sysprep. I would recommend to check the device drivers and make sure the devices are installed properly. Are you using this on a Virtual Machine? I’ve done this a dozen times and has worked for me following these instructions.

Leave a Reply

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