Is there a reliable way to determine the OS upgrade history leading to Windows 10 or if it was a fresh install?
-
2Look out for a `Windows.old` folder on your boot drive. If that folder is present, check whether it contains data from an earlier Windows version or Windows 10. – GiantTree Jan 27 '16 at 16:04
-
3@GiantTree that's a temporary way to tell, since that folder is deleted after 30 days. I'm unaware of any other method to tell whether it was an upgrade or clean installation. – DrZoo Jan 27 '16 at 17:16
-
4look for the value **MediaBootInstall** under **HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Setup/OOBE/**. If MediaBootInstall = 1, WIndows was installed via ISO/DVD. If MediaBootInstall = 0, the Windows was an upgrade – magicandre1981 Jan 27 '16 at 17:19
3 Answers
There is an excellent tutorial on Ten Forums pertaining to a separate topic:
How to Move Users Profile Folder to another Location in Windows 10
Within that tutorial, the author says the following:
We need to edit Windows registry to "fool" Windows to think this is a clean install instead of an upgrade. To do this open the Registry Editor (WIN + R, type regedit, hit Enter), browse to key HKEY_LOCAL_MACHINE\SYSTEM\Setup
Delete both the DWORD Upgrade (right pane) and KEY Upgrade (left pane), see screenshot.
The author's subsequent screen shot displays the appropriate entries in the registry:
The following area within the registry seems to be the key to determining whether or not a Windows 10 install was an upgrade:
HKEY_LOCAL_MACHINE\SYSTEM\Setup
In order to prove this theory, I first initiated a clean install of Windows 10 on my test machine and scrutinized the same area of the registry. The Upgrade key is notably absent:
Next, I used another machine for a clean install of Windows 7 and then performed an in-place upgrade to Windows 10. Looking at the same area of the registry, I saw the following:
Notice that the Upgrade key is present, along with a pertinent Source OS key. If we take a closer look at the Source OS key we see the following:
You can clearly see Windows 7 Enterprise listed as the value for the ProductName related to the Source OS key.
Community feedback led to additional research. Taking a look at another machine that was originally setup with a clean install of the RTM baseline of Windows 10 (version 1507), we see the following:
Although this computer's OS was configured via a clean install, the Upgrade key is still present. However, when we examine each Source OS key we can see that the dates for each update correspond to approximately the same time frame as the first two major Windows 10 feature update releases: versions 1511 and 1607. Also, the value for the ProductName shows Windows 10 Pro, even on the oldest Source OS key. The newer Source OS key features an additional clue:
The latest update shows a ReleaseId value of 1511, indicating the precise version of Windows 10 that was being utilized prior to the update.
Based upon what we have seen, we can draw the following conclusions:
- The
HKLM\SYSTEM\Setupregistry key allows us to determine if Windows 10 was originally setup with a clean install, or an upgrade. - If the
Upgradekey is missing, it was definitely a clean install. - If the
Upgradekey is there, it could have been generated by a traditional Windows upgrade (from either Windows 7 or Windows 8.x), or it may have been created during a major Windows 10 feature update (e.g., versions 1511 and 1607). - If the
Upgradekey is there, you need to inspect theSource OSkeys. - The oldest
Source OSkey will reveal the original operating system within the correspondingProductNamevalue: if it's a flavor of Windows 7 or Windows 8, it was an upgrade. If it is a variant of Windows 10, it was a clean install.
As posted by Magicandre1981 in the comments:
Look for the value MediaBootInstall under
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Setup/OOBE/.
If MediaBootInstall = 1, WIndows was installed via ISO/DVD.
If MediaBootInstall = 0, the Windows was an upgrade
- 58,044
- 21
- 113
- 176
-
I've checked multiple Windows 10 1511 and 1607 installs, and none of them have a MediaBootInstall key in the OOBE branch. They have an "InstallType", and so far it's been either 4 or 5, but I haven't been able to discern its use/meaning yet... – Ƭᴇcʜιᴇ007 Mar 02 '17 at 16:07
-
@Ƭᴇcʜιᴇ007, I took the time to check two machines on my home network in an attempt to verify this. Both of them were setup with a clean install of Windows 10 1607 back in late January: one is x64, the other is x86. Each of them actually does have the `MediaBootInstall` DWORD related to the `OOBE` key, but the value is `0` within both. In my experience, both Magicandre1981 and Moab have been a terrific source of reliable Windows answers, so I have no doubt that this was probably true at some point in time. However, the ongoing evolution of Windows 10 seems to have overridden this answer. – Run5k Mar 05 '17 at 20:51
-
Just installed Win10 (20H2) to the newly formatted SSD and the `MediaBootInstall` dword is `0`. – A.D. Oct 25 '20 at 14:03
$Products = Get-ItemProperty -Name ProductName -Path "HKLM:\SYSTEM\SETUP\Source OS*" | select Productname -Unique
if ($Products -like '*7*')
{
WRITE-HOST Upgraded
}
ELSE
{
Write-Host Fresh Install
}
- 25,487
- 19
- 95
- 131





