"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.
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\ChildCompletion] "setup.exe"=dword:00000003