Mick's IT Blogs

My blog is here to help solve issues I have encountered and solved, publish scripts I have written, and educate others in understanding areas that are not well covered.

Mick's IT Blogs

Information Technology Zone

26 January 2012

"The Computer Restarted unexpectedly or encountered an unexpected error" during sysprep

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.

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  

64 Comments:

At February 1, 2012 at 10:44 AM , Blogger Elise said...

We received the same error on one of our machines, but, in our case, it was due to bad memory.

 
At February 20, 2012 at 1:15 AM , Blogger Mick said...

Thanks for the info!

 
At February 25, 2012 at 4:57 PM , Blogger TongSama said...

This 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.

 
At February 27, 2012 at 6:09 PM , Blogger Mick said...

Did this work for you today?

 
At March 3, 2012 at 8:16 PM , Blogger TongSama said...

Ahh, 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.

I 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.

 
At March 6, 2012 at 12:57 PM , Blogger Willis Drummond said...

Hello. This advice solved my problem. Many thanks!

 
At March 23, 2012 at 4:55 AM , Blogger Jonny Jones said...

This has solved my problem with start up of a new laptop. Thanks a million!

 
At May 15, 2012 at 1:13 PM , Blogger Gregocam said...

Only solution on the net! but correct! Thank you a 1000-times!

 
At May 25, 2012 at 3:26 AM , Blogger Cristiano Paluffi said...

Thank you for your post, I used your suggestion on Windows Server 2008 R2 and it worked.
Kind Regards,
Cristiano

 
At May 25, 2012 at 2:31 PM , Blogger Unknown said...

Funny 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!

 
At May 26, 2012 at 9:07 PM , Blogger Mick said...

Thanks for confirming this works on Server 2008! I will update the blog to reflect this.

 
At June 12, 2012 at 4:00 AM , Anonymous Anonymous said...

Thanks for the solution

 
At June 21, 2012 at 6:48 AM , Anonymous Anonymous said...

Thank you! After a week of searching the web and trying things that didn't work I finally stumbled upon this post and it WORKED!!!

 
At July 10, 2012 at 12:56 PM , Anonymous Anonymous said...

Sooo thankful for this solution. Saved me today!

 
At July 24, 2012 at 4:01 AM , Anonymous D-iT said...

Nice 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

 
At July 26, 2012 at 2:58 AM , Anonymous Anonymous said...

You have saved me 2 days work after a failed sysprep! Thank-you very much

 
At July 30, 2012 at 4:35 PM , Blogger lol said...

Saved me 8 hours of image build time. Your my new hero.

 
At August 12, 2012 at 7:23 AM , Anonymous Christopher Abayan said...

i encountered the same error in vista and this works... thanks a lot dude

 
At August 14, 2012 at 8:58 AM , Anonymous Anonymous said...

Thanks, thanks, thanks, thanks and thanks!!!!!!!!!!!!

 
At August 16, 2012 at 10:42 AM , Anonymous Anonymous said...

You just saved me from rebuilding my sysprep'd image! Thank you!!

 
At August 22, 2012 at 6:52 AM , Blogger Kevin Seddon said...

Thanks alot for this post, it worked a treat on a Sony laptop I have imaged.

However, 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?

 
At September 11, 2012 at 6:42 AM , Anonymous Anonymous said...

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.
Restoring/reinstalling was the only option but now finaly... Thanks for sharing the solution.

 
At September 18, 2012 at 1:01 AM , Blogger Andrew R. Miller said...

I LOVE YOU

 
At September 24, 2012 at 12:17 PM , Blogger rameshmichaels said...

Thanks a lot brother...
U saved a lot of time.. and just blew me into
the safe zone... thanks a lot .

 
At September 25, 2012 at 11:43 PM , Anonymous Anonymous said...

This solution works...!!!!
Thanks a lot bro...Nice job...!!!

 
At September 29, 2012 at 1:18 PM , Blogger aprendiz said...

ah, sim o cara é foda manja mesmo, vlwww, deu certo aqui!!!!!

 
At October 2, 2012 at 5:08 PM , Anonymous Anonymous said...

awsome worked great!!

 
At October 3, 2012 at 10:53 AM , Blogger Drew The Schizoid Sage said...

It works! This was very helpful. Props to the author. Thanks a ton!

 
At October 4, 2012 at 9:23 AM , Anonymous Anonymous said...

Thanks worked for me on Windows 7 :-)

 
At October 8, 2012 at 8:26 AM , Anonymous Anonymous said...

Thanks worked for me as well.

 
At October 13, 2012 at 5:30 AM , Anonymous Anonymous said...

After 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!

 
At October 13, 2012 at 5:31 AM , Anonymous Anonymous said...

After 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!

 
At October 15, 2012 at 7:38 PM , Anonymous nick p said...

add 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.
Thank you very much!

 
At November 2, 2012 at 7:06 PM , Anonymous Anonymous said...

Thanks for posting this! worked like a charm!

 
At November 9, 2012 at 9:55 PM , Anonymous Anonymous said...

Thanks bro u do not know how much he helped me thaaaanx man

 
At November 11, 2012 at 11:04 AM , Anonymous Anonymous said...

Thank you Mick, it worked for Vista too. I had the problem when I wanted a factory restore.

 
At November 19, 2012 at 9:14 AM , Anonymous Anonymous said...

Thanks! Thanks! Thanks!

 
At November 20, 2012 at 4:59 PM , Anonymous Anonymous said...

Hi.... 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

 
At November 21, 2012 at 12:47 PM , Blogger Mick Pletcher said...

If 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.

 
At November 30, 2012 at 3:53 AM , Anonymous Anonymous said...

You seem to have nailed the problem!
Mick 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!!!

 
At November 30, 2012 at 8:50 AM , Anonymous Anonymous said...

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!!!!

 
At January 17, 2013 at 9:34 PM , Anonymous Anonymous said...

Thanks so much it worked!

 
At January 23, 2013 at 8:12 AM , Anonymous Anonymous said...

Thanks, it works great!
Vista ...

 
At January 24, 2013 at 5:48 PM , Anonymous Anonymous said...

Omg thank you soo much I thought I lost my computer but you saved it thank you so much for saving my pc

 
At February 5, 2013 at 3:48 AM , Anonymous Anonymous said...

Antivirus software (McAffee VirusScan) must be disabled or uninstalled before SYSPREP. Check antivirus log file.

 
At February 5, 2013 at 10:41 PM , Anonymous Anonymous said...

Worked for installing Windows 8.

Thank you!

 
At February 8, 2013 at 1:34 AM , Anonymous Anonymous said...

i get error code 0xc0000001

 
At February 18, 2013 at 11:24 PM , Anonymous Anonymous said...

Yup worked for W7 and W8

 
At February 19, 2013 at 2:29 PM , Anonymous Anonymous said...

Windows Server 2008 R2 Enterprise.
%insert thumbs up emoticon here%

 
At March 1, 2013 at 2:43 AM , Blogger Carlos Gomez said...

Windows 7 Professional x86 (32-bits)
THIS 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.

 
At March 9, 2013 at 8:05 AM , Anonymous Anonymous said...

Thank you very very much... It worked on my Win 8 pro with media centre x64.....
Thanks Again :D

 
At March 10, 2013 at 11:47 AM , Anonymous Anonymous said...

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

 
At March 18, 2013 at 4:26 PM , Anonymous Anonymous said...

thankx!!!
this managed to solve my prob, for cloning my system with new m/b, cpu ..

 
At May 16, 2013 at 12:11 PM , Anonymous Anonymous said...

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

 
At May 22, 2013 at 5:18 PM , Anonymous Gigih Wahyudi said...

SOLVED MY PROBLEM AFTER 5 MONTH..

HUGE THANKS :D

 
At July 25, 2013 at 5:38 AM , Blogger sager said...

Very informative and well written post! Quite interesting and nice topic chosen for the post.

HP - Pavilion 17.3" Refurbished Laptop - 4GB Memory - 500GB Hard Drive - Sparkling Black

 
At August 16, 2013 at 3:34 AM , Anonymous Anonymous said...

Thank you! Helped me meet a deadline! much appreciated!

 
At September 25, 2013 at 7:04 AM , Anonymous Anonymous said...

Can confirm that this also works on Server 2012!
Thankyou! Saved my day!!

 
At December 25, 2013 at 11:39 PM , Blogger Kevin Albina said...

I Love You
THANK YOU , YOU SAVED ME!!

 
At May 12, 2014 at 6:21 AM , Anonymous Anonymous said...

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
HKEY_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 ;)

 
At May 12, 2014 at 7:50 AM , Anonymous Anonymous said...

http://shubell.wordpress.com/2014/05/12/windows-vista-sysprep-multiple-partitions/

 
At September 11, 2014 at 6:26 AM , Anonymous Anonymous said...

Hello. This advice solved my problem. Many thanks!

 
At September 11, 2014 at 11:20 AM , Anonymous Anonymous said...

It also works on windows 2012 servers

 
At October 1, 2014 at 11:43 AM , Anonymous Anonymous said...

This also helped me with a Windows 2012 R2 server in place upgrade. Thank you SO much for this post!

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home