Windows setup failure on Dell computer

I was installing Windows 7 on a Dell notebook today, and got an error that this computer, which had Win 7 before the hard drive crashed, could not be configured to install Windows 7. I found a Dell tech note that advised OOBE had to be manually executed and then all would be fine. Yeesh, Windows.

"Windows setup could not configure to run on this computer's hardware" error during Windows 7 or Windows 10 installation

tl;dr version:

Windows 7:

  1. At the error screen, press Shift+F10 to open a command prompt.
  2. Type cd \ and press Enter.
  3. Type cd c:\windows\system32\oobe and press Enter.
  4. Type msoobe and press Enter. The installation process should now automatically continue.
  5. Remove the installation media and the system should finish the installation and boot into Windows.

Windows 10:

  1. While on the screen where the error appears, press Shift+F10 to bring up the command prompt.
  2. Type CD C:\windows\system32\oobe and hit Enter.
  3. Type msoobe and hit Enter.
  4. You may then be prompted to create an account name and password, and set the time and date. Click Finish when done.