Firstly, not really Windows 8, but Windows 8.1 (which matters?)

As a family IT support person I've been asked to reinstall Win8.1 for a family member, and I don't know if the bigger cause for my misfortunes was it being pirated, or Win8.1 breaking reinstalls (as I've read online from multiple sources), but it certainly wasn't fun.

No matter what I've done, I've got the message:
Insert Media. Some files are missing.
Your windows installation or recovery media will provide these files
and after inserting working recovery media another message telling me the recovery media isn't working.

After perusing for hours, I've found a working solution (at least for me):

  1. First, get a Win8.1 ISO from Microsoft.
    Remember to pick the correct architecture and version.

  2. Mount this ISO file and get only the <iso>/sources/install.wim file

  3. On your system drive (probably C:) make a folder win8 or similar (so C:\win8) and copy the install.wim file there

  4. Open an elevated prompt (right click on cmd, run as administrator)
    and run the command reagentc.exe /setosimage /path C:\win8 /Index 1
    This tells the "REAgentC" program that manages the recovery environment to use your Windows Image.

After this, you can reinstall your Win8.1 the 'intended' way, by opening
Settings>Change PC Settings>Update and recovery
Remove everything and reinstall Windows

(by intended I mean not just completely reinstalling the OS, which I'dve done if I wasn't worried for product keys)

Other useful related commands:

  • DISM.exe /Online /Cleanup-Image /RestoreHealth Deployment Image Servicing and Management - fixes corruptions
  • sfc /scannow System File Checker - scans Windows and restores missing/broken files

The main difference I see is the location these programs get their missing files from, but as with everything Windows - who knows what they really do. []

Also, my DISM hanged at 20% so I just ran sfc.

If you also during your struggles need safe mode but F8 doesn't work, open an elevated prompt and run: Bcdedit /set {bootmgr} displaybootmenu yes

That should allow you to open Startup Settings during a restart. []

If you also work on a Mac and also forget a way to flash an ISO to a drive, I've written about it too: flashing-isos-on-mac