15

Is there a reliable way to determine the OS upgrade history leading to Windows 10 or if it was a fresh install?

  • 2
    Look 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
  • 4
    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 – magicandre1981 Jan 27 '16 at 17:19
19
+250

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:

Delete Upgrade DWORD

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:

HKLM System Setup

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:

Registry - Upgrade Setup

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:

Registry - Upgrade Source OS

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:

Registry Upgrade - Source OS 1511

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:

Registry Upgrade - Source OS 1607

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\Setup registry key allows us to determine if Windows 10 was originally setup with a clean install, or an upgrade.
  • If the Upgrade key is missing, it was definitely a clean install.
  • If the Upgrade key 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 Upgrade key is there, you need to inspect the Source OS keys.
  • The oldest Source OS key will reveal the original operating system within the corresponding ProductName value: 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.
  • @Ƭᴇcʜιᴇ007, thank you, good sir! I enjoyed working on this one. – Run5k Mar 6 '17 at 20:20
1

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

  • 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 2 '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 5 '17 at 20:51
0
$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
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.