After running Sysprep on a Windows 7 computer I was greeted with the message “Windows could not parse or process the unattend answer file for pass….”
I was not trying to use an unattended answer file at the time so a bit of a strange message.
At this point I could not get the computer to start Windows properly I kept getting the message;
“The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windows, click “OK” to restart the computer and then restart installation.”
To convince the computer it is not longer in setup you have to change a couple values in the registry, however how do you change the registry if you cannot get the computer to boot. I found great post from Chris Davis at 9z.com that helped. The below is a copy of his steps.
- Boot to your Windows install media (which runs Windows PE) and get to the command prompt. As soon as the installer gets to the first screen hold down shift and press F10. It should look like this.
- After pressing Shift+F10 it will look like this – so type “regedit” and hit enter:
- And the registry editor will open. Now here’s the challenge, the registry you’re looking at is not the settings for your computer. Your machine is offline, this is the registry hives for the Windows Preinstallation Environment (PE) and changing them won’t help you so you need to load YOUR computer’s System hive.Here’s how. First, click and highlight the HKEY_LOCAL_MACHINE as shown:
- No go to File->Load Hive:
- And browse out to d:\windows\system32\config. (note the drive in this case is D: not c: remember that your computer is offline, this is why it won’t be under c:\):
- After this you will be able to access the offline system hive by expanding the tree as shown until you get to setup (make sure you expand system2 not system:
- After exposing the offline values you’ll see that the hive has a bunch of stuff in there about ongoing setup processes. We’ll need to change these. Specifically, you need to zero out the OOBEInProgress, SetupPhase, SetupType, and SystemSetupInProgress by double-clicking each one and putting a “0” into the value field.You will also want to clear out all of the text in CmdLine (which currently has the value of oobe\windeploy.exe)Here is a screenshot from a good system’s registry
- After following Chris Davis’s great steps I rebooted the computer and the OBE setup wizard had been cancelled.
- I did a search on the C drive and found two “unattend.xml” files under “C:\windows\panther”
- I deleted these and ran Sysprep again and I was fine