Never did any of them. On all my upgrade installs (7 upgrade and 8 upgrade) there was an option in the install process to do a clean install.
In fact before installing Windows 7 and 8 upgrade i formatted my HD both time to remove any trace of Windows and was able to install them without any trouble.
This is like what said earlier, you get the option to do a custom install if booting from the disc. The windows setup looks on the HDD to see if there is a Windows install there. It does not have to be an activated install, it just needs to be some install. That essentially sets the flag in the registry to say this was an upgrade so when you get to the activation part it works. That's why it works even if you format. It checks for that before you format it.
If you had a blank HDD, you would have to install Windows then edit the registry to change the flag to say it was an upgrade and then it would let you activate after you do the rearm command.
It in no way looks at the previous installation disc. In fact you don't even get that option to do such during Windows setup for Vista going forward to insert a disc. In the XP days you would get that prompt.