The error "The Computer Restarted unexpectedly or encountered an unexpected error" is an annoying error that completely stops the sysprep setup process. The system does not need to be rebuilt. The issue that caused it on one of the machines we encountered this on was due to the fact that some profiles had been deleted from the file structure, but the registry entries were left in tact. In order to fix this issue, you will need to change the registry key HKLM/SYSTEM/SETUP/STATUS/ChildCompletion Setup.exe from 1 to 3. This will allow the sysprep process to complete. The drivers will not be installed and likely, the system will not be joined to a domain, if applicable. The main thing is that the OS can now be booted up and logged into. Here is the contents of a reg file that will change it for you.
In order to get to the registry, when the above listed error appears, hit Shift-F10. This will bring up a command prompt window. Type regedit and then make the registry change. At that point, reboot the machine and it should boot up into Windows 7.
In order to get to the registry, when the above listed error appears, hit Shift-F10. This will bring up a command prompt window. Type regedit and then make the registry change. At that point, reboot the machine and it should boot up into Windows 7.
NOTE: This was performed on a Windows 7 64-bit machine. Per a reply to this blog, it was also confirmed to work on Windows Server 2008.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion]
"setup.exe"=dword:00000003
We received the same error on one of our machines, but, in our case, it was due to bad memory.
ReplyDeleteThanks for the info!
ReplyDeleteThis helped me in a virtual lab test environment. I sysprepped a computer that was on a domain and it does this sysprep loop when loading up. I will try this on the laptop with the issue on Monday.
ReplyDeleteDid this work for you today?
ReplyDeleteAhh, unfortunately the production laptop's orig hard drive got formatted when the tech used image software to "clone" to the new laptop. And the new laptop received a reinstall since I didn't think an answer existed because I could not find a solution 3 months ago. Oh well, I can, however, duplicate this problem by sysprepping a computer joined to the domain. Then I force restart while sysprep is setting up the registry on first boot. The VM would go into this loop.
ReplyDeleteI found this article by searching "Computer Restarted unexpectedly sysprep". But it seems this solution applies to failed windows 7 installs too.
Side note to others: Shift + f10 to open up command prompt and open regedit when you see this error message.
Hello. This advice solved my problem. Many thanks!
ReplyDeleteThis has solved my problem with start up of a new laptop. Thanks a million!
ReplyDeleteOnly solution on the net! but correct! Thank you a 1000-times!
ReplyDeleteThank you for your post, I used your suggestion on Windows Server 2008 R2 and it worked.
ReplyDeleteKind Regards,
Cristiano
Thanks for confirming this works on Server 2008! I will update the blog to reflect this.
DeleteFunny enough, this is the second time I've fallen into this trap. Win7 setup, by default, disables the Administrator account, and has you set up another administrative account during first install. to keep things clean, and to take advantage of the bit of sysprep that copies the administrator account to the default account, I always remove this account, and use local administrator to set the machine up before pulling an image to deploy. Well, removing that dummy account causes the mini-setup to fail upon pulling and booting the image unless you do some registry cleanup that Win7 can't be arsed to do itself. This tip helped me save a re-install by getting me back into the install so I could re-sysprep it after I cleaned things up. Thanks!
ReplyDeleteThanks for the solution
ReplyDeleteThank you! After a week of searching the web and trying things that didn't work I finally stumbled upon this post and it WORKED!!!
ReplyDeleteSooo thankful for this solution. Saved me today!
ReplyDeleteNice one Mick, I've just spend a day or two creating a new custom image for my company and thought all my hard had gone to waste - but with your advice I can now get windows 7 to boot and can recify this problem and re-sysprep. Thanks
ReplyDeleteYou have saved me 2 days work after a failed sysprep! Thank-you very much
ReplyDeleteSaved me 8 hours of image build time. Your my new hero.
ReplyDeletei encountered the same error in vista and this works... thanks a lot dude
ReplyDeleteThanks, thanks, thanks, thanks and thanks!!!!!!!!!!!!
ReplyDeleteYou just saved me from rebuilding my sysprep'd image! Thank you!!
ReplyDeleteThanks alot for this post, it worked a treat on a Sony laptop I have imaged.
ReplyDeleteHowever, I decided to make this registry change in the image's registry hive directly, so we don't have to repeat this process everytime we use the image, and I get an error message coming back saying "Unable to make registry changes", and the install reverts all changes. Any suggestions?
Working for a company that sells computers/laptops i had a lot of machines with this problem and never could figure out what was causing it.
ReplyDeleteRestoring/reinstalling was the only option but now finaly... Thanks for sharing the solution.
I LOVE YOU
ReplyDeleteThanks a lot brother...
ReplyDeleteU saved a lot of time.. and just blew me into
the safe zone... thanks a lot .
This solution works...!!!!
ReplyDeleteThanks a lot bro...Nice job...!!!
awsome worked great!!
ReplyDeleteIt works! This was very helpful. Props to the author. Thanks a ton!
ReplyDeleteThanks worked for me on Windows 7 :-)
ReplyDeleteThanks worked for me as well.
ReplyDeleteAfter two days I finally got it to work without reinstalling my Windows Server 2008 SP2! You're my personal hero! Thank you very much! I love you!
ReplyDeleteAfter two days I finally got it to work without reinstalling my Windows Server 2008 SP2! You're my personal hero! Thank you very much! I love you!
ReplyDeleteadd one more satisfied customer. Something had corrupted my current Windows 7 install and while trying to reinstall from the recovery DVDs I encountered that issue.
ReplyDeleteThank you very much!
Thanks for posting this! worked like a charm!
ReplyDeleteThanks bro u do not know how much he helped me thaaaanx man
ReplyDeleteThank you Mick, it worked for Vista too. I had the problem when I wanted a factory restore.
ReplyDeleteThanks! Thanks! Thanks!
ReplyDeleteHi.... im having the same error but cant find the path to change.... all my machine goes up to is setup .....theres no childcompletion in my path .....please help
ReplyDeleteIf it is getting stuck at the setup, then I would mount the drive onto a working machine and then edit the registry from there. After editing the registry, put the HDD back into the system you were sysprepping it on and restart it. See if that corrects the issue.
ReplyDeleteYou seem to have nailed the problem!
ReplyDeleteMick Pletcher you are a star!
I was about to go nuts....now its installing and I am so far happy as a bee!
Thank you very much!!!
Worked for me too on a new machined that I received with this issue on. After changing the registry to 3, as advised here, I restarted, and got a new error: WinSAT.exe - Bad Image. C:\windows\system32\NV\igdum64.dll is either not designed to use on windows or it contains an error. So I got worried and changed the registry back straight away and restarted the computer by holding the power button. It came back with the same error, so I immediately went back to the registry and it was still 3 (it did not get changed back to 1 after all). So I changed it to 1 again and clicked OK on the error box a few times now instead of shutting the laptop down. I was surprised when I saw that windows ran successfully! Please note that this time I had managed to change the registry back to 1, and it continues at 1 but works fine. Any ideas why this is? Thanks very much for the help!!!!
ReplyDeleteThanks so much it worked!
ReplyDeleteThanks, it works great!
ReplyDeleteVista ...
Omg thank you soo much I thought I lost my computer but you saved it thank you so much for saving my pc
ReplyDeleteAntivirus software (McAffee VirusScan) must be disabled or uninstalled before SYSPREP. Check antivirus log file.
ReplyDeleteWorked for installing Windows 8.
ReplyDeleteThank you!
i get error code 0xc0000001
ReplyDeleteYup worked for W7 and W8
ReplyDeleteWindows Server 2008 R2 Enterprise.
ReplyDelete%insert thumbs up emoticon here%
Windows 7 Professional x86 (32-bits)
ReplyDeleteTHIS WORKS!!!!
I sysprep my Windows OS from my MAC LAPTOP, and cloned it to a separate HDD
First boot on a new (regular windows laptop), got BSOD 0x000007d, restarted and then sysprep failed. I then changed the value above and it finished the sysprep.
Thank you very very much... It worked on my Win 8 pro with media centre x64.....
ReplyDeleteThanks Again :D
Thank you! Your solution saved my prob with Windows7 Home Premium. However, you didn't explain the step after reboot. After starting the Windows successfully, I was prompted to a screen 'system preparation tool' hardware independence and clean up
ReplyDeletethankx!!!
ReplyDeletethis managed to solve my prob, for cloning my system with new m/b, cpu ..
Woo Hoo. This resoved the issues I had restoreing a customer's Ghost image to VM using ghost's deployanywhere to retarget the OS (to deal with the change of hardware) it got hung up at this step and the reg key worked :) thanks so much
ReplyDeleteSOLVED MY PROBLEM AFTER 5 MONTH..
ReplyDeleteHUGE THANKS :D
Very informative and well written post! Quite interesting and nice topic chosen for the post.
ReplyDeleteHP - Pavilion 17.3" Refurbished Laptop - 4GB Memory - 500GB Hard Drive - Sparkling Black
Thank you! Helped me meet a deadline! much appreciated!
ReplyDeleteCan confirm that this also works on Server 2012!
ReplyDeleteThankyou! Saved my day!!
I Love You
ReplyDeleteTHANK YOU , YOU SAVED ME!!
I got this error when i wanted to restore a system that i just syspred. The problem was that the system drive (boot drive) received the letter c and the windows drive received the drive h. Well i fixed it so that i edited the registry
ReplyDeleteHKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
removed the drive C and renamed the windows drive c
i also edited the
[HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion] setup key to 2 ;)
http://shubell.wordpress.com/2014/05/12/windows-vista-sysprep-multiple-partitions/
ReplyDeleteHello. This advice solved my problem. Many thanks!
ReplyDeleteIt also works on windows 2012 servers
ReplyDeleteThis also helped me with a Windows 2012 R2 server in place upgrade. Thank you SO much for this post!
ReplyDeleteThis helped me with a very stressful stage, thank you!
ReplyDeleteYou are the best. Thank you sooooooo much. AHHHHHHHH
ReplyDeleteGet this same error, but the solution does not work for me, as I only have this in the reg settings: HKEY_LOCAL_MACHINE\SYSTEM\Setup Do not have the status folder... Any ideas.
ReplyDeleteconfirmed working on win10
ReplyDeletemany thanks
doesn't work, the registry key your supposed to change, isn't even in the registry, so how can i change it. Please answer this. thanks.
ReplyDelete