Windows 8 clean install with an upgrade license

I really needed a clean Windows installation, so after moving a lot of files I reinstalled it, and all went well so far. But then Windows 8 told me it wasn't activated. I tried entering my key again, but it then told me:
The Software Licensing Service determined that this specified product key can only be used for upgrading, not for clean installs.
 Luckily, I wasn't the only one with this issue. This post in the Microsoft forums describes the solution quite well. Here's a step-by-step tutorial for you.

  • Press [WIN] to open the start menu, type in regedit and press [ENTER].
  • Then, navigate to this folder: "HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Setup/OOBE/" and set the registry key "MediaBootInstall" from "1" to "0". Close the registry editor.
  • Press [WIN] to open the start menu, type in cmd, right click the "Command Prompt" entry and choose "Run as administrator". Confirm with "Yes".

In the command prompt, type:
slmgr /rearm
Restart your computer and your copy of Windows 8 will run on a clean install with an upgrade license.