Can't re-image laptop, "Windows Setup could not configure Windows to run on this computer's hardware"

6,017

Solution 1

I decided to do a clean OS install on the laptop. There are no problems thus far, everything works normally - time will tell if this is the right answer or not.

Aside from the unexplainable error while Windows "out of the box experience" prepared the machine after imaging, everything else could be software issues (and so could that, just a very odd one). System diagnostics showed nothing and hardware was otherwise well-behaved.

UPDATE: I later discovered that it may have been the fact that I used a relative path to the unattend.xml file in my sysprep command. I've since switched to always fully qualifying the path to my unattend.xml, e.g.:

sysprep /generalize /oobe /shutdown /unattend:c:\temp\unattend.xml

Additionally, I use a YUMI Multiboot USB drive with Windows 7 installer on it and my imaging software, and in the common problems/faq area for YUMI multiboot it states:

  • When installing Windows 8, 7, or Vista from USB, you must unplug the USB device before the first restart, otherwise you will receive an error stating:

"windows setup could not configure windows to run on this computer's hardware"

Since making those two changes, I've never had a similar issue again.

End of Update

Solution 2

Have you considered that the system itself may be faulty? Have you considered contacting Lenovo or at least running through the system diagnostics?

Share:
6,017

Related videos on Youtube

Joshua McKinnon
Author by

Joshua McKinnon

Updated on September 18, 2022

Comments

  • Joshua McKinnon
    Joshua McKinnon almost 2 years

    A user's laptop (Lenovo W520) was having strange issues (could not open mspaint, among other things, other apps crashing a lot), and it is only 2 months old. After chkdsk and Lenovo diagnostics CD (a full run), nothing surfaced so I decided to re-image the machine since problems persisted and there was minimal data to backup.

    I happened to have created a sysprep'd standard image from this exact laptop as a basis (sysprep /generalize /OOBE with an unattend file I created) - Windows 7 Professional 64-bit, so the hardware and drivers are an exact match. I re-imaged the drive w/ the image, and during "Setup is applying system settings", it displays the message:

    Windows Setup could not configure Windows to run on this computer's hardware
    

    It then auto-reboots in a few seconds, and every boot from there on in it gets the error message:

    The computer restarted unexpectedly or encountered and unexpected error. Windows
    installation cannot proceed. To install Windows, click "OK" to restart the
    computer, and then restart the installation.
    

    My question is, what could cause this?

    Several other identical W520 laptops had this sysprep'd image deployed to them without issues, and since this laptop was the original it's gone through this exact sysprep'd state before.

    UPDATE: added unattend file

    Below is my unattend.xml with passwords sanitized - it uses the KMS client key, so no need to sanitize that. It is very basic from following the guide here.

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="generalize">
            <component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipRearm>1</SkipRearm>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <RunSynchronous>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>1</Order>
                        <Path>net user administrator /active:yes</Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </component>
            <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipAutoActivation>true</SkipAutoActivation>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <CopyProfile>true</CopyProfile>
                <ShowWindowsLive>false</ShowWindowsLive>
                <TimeZone>Eastern Standard Time</TimeZone>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <InputLocale>en-us</InputLocale>
                <SystemLocale>en-us</SystemLocale>
                <UILanguage>en-us</UILanguage>
                <UserLocale>en-us</UserLocale>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <AutoLogon>
                    <Password>
                        <Value>XXX</Value>
                        <PlainText>false</PlainText>
                    </Password>
                    <Enabled>true</Enabled>
                    <LogonCount>5</LogonCount>
                    <Username>administrator</Username>
                </AutoLogon>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <NetworkLocation>Work</NetworkLocation>
                    <ProtectYourPC>1</ProtectYourPC>
                </OOBE>
                <UserAccounts>
                    <AdministratorPassword>
                        <Value>XXX</Value>
                        <PlainText>false</PlainText>
                    </AdministratorPassword>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>XXX</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Name>Administrator</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <RegisteredOrganization>COMPANY</RegisteredOrganization>
                <RegisteredOwner>Information Technology</RegisteredOwner>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>cscript //b c:\windows\system32\slmgr.vbs /ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4</CommandLine>
                        <Order>1</Order>
                        <RequiresUserInput>false</RequiresUserInput>
                    </SynchronousCommand>
                    <SynchronousCommand wcm:action="add">
                        <Order>2</Order>
                        <CommandLine>cscript //b c:\windows\system32\slmgr.vbs /ato</CommandLine>
                        <RequiresUserInput>false</RequiresUserInput>
                    </SynchronousCommand>
                </FirstLogonCommands>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="catalog:d:/download/isos/microsoft-vlk/win7_64_sp1/sources/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    

    Updated: My original sysprep command was, with the unattend.xml file in c:\windows\system32\sysprep, and that as my current working directory:

    sysprep /generalize /oobe /shutdown /unattend:unattend.xml
    

    What I've tried:

    • Run full Lenovo system diagnostics (full system, and full SMART test) each came back clean
    • Verified SATA mode is correct (AHCI)
    • Reset BIOS to defaults
    • Re-imaging...verifying image is valid
    • Ricardo Polo Jaramillo
      Ricardo Polo Jaramillo almost 13 years
      Add please your unattend file.
  • Joshua McKinnon
    Joshua McKinnon almost 13 years
    As stated, I've already run full lenovo system diagnostics. I do consider the system might be faulty and that's high on the list...but am at a loss for where to begin the support request with lenovo as I have no particular component to complain about
  • user48838
    user48838 almost 13 years
    You can consider stating to their support what you have stated here. One other possibly testing consideration may be to boot (or install) one of the bootable Linux distros, but be-warned that some of the Lenovo models are not well/fully support under the various Linux iterations.
  • Joshua McKinnon
    Joshua McKinnon almost 13 years
    Verified this syspreped image was the cause when I got another new W520 in and got the same problem. It's possible I sysprep'd the same template twice or something else stupid and that caused the problem...