Troubleshoot Windows 10 Setup Has Failed to Validate the Product Key
The ‘Setup has failed to validate the product key’ error is typically encountered when users try to upgrade to Windows 10 from an older Windows version like Windows 7 or Windows 8.1 using an ISO file.
What’s causing the ‘Setup Has Failed to Validate the Product Key’ Error?
- 3rd party AV interference – It has been confirmed that the upgrading utility can be interrupted from communicating with the external servers by an overprotective 3rd party suite. In this case, you can fix the problem by disabling real-time protection or by uninstalling the security program altogether.
- The unpacked installer is already present in Temp – Another possibility is that the upgrading tool throws this error because it already finds an unpacked installer inside the temp folder. If this scenario is applicable, you can get the issue resolved running the Disk Cleanup utility to clear every temporary file.
- Pkey key is not attached to media installation – As it turns out, the issue can also be caused by a log file (setuperr.log) file in situations where the user tries to upgrade using an installation media without a license key. In this case, you can apply the license key using a series of CMD commands.
- System File Corruption – System File corruption can also be responsible for the apparition of this error message. Most likely, a couple of corrupted dependencies are forcing the upgrading utility to end the process prematurely. In this case, you can fix the problem by running a complete DISM scan.
- Config File is missing – Another potential scenario is a situation in which the upgrading media that you’re using is missing a key config file that is needed for the installation. To fix it, you can create the config file easily using Notepad.
Method 1: Disabling 3rd party AV (if applicable)
If you’re using a 3rd party security suite that tends to be overprotective, it’s entirely possible that it ends up interrupting the connection between the upgrading setup with the external servers.
In case this scenario is applicable to you and you’re using a 3rd party suite that might interfere with the upgrade, you should retry the upgrade after disabling or uninstalling the potential antivirus culprit.
If you find yourself in this situation, start by disabling real-time protection and see if the upgrade is successful. To do this, simply access the taskbar icon associated with your AV and look for an option that disables the real-time protection.
If this doesn’t work or you didn’t find the equivalent option in your AV menus, try uninstalling the security program altogether to ensure that there are no security rules that might influence this upgrading process. To do this, file this article (here) – it will show you how to install your security program and ensure that you also remove any leftover files that might still cause this behaviour.
In case this method wasn’t applicable or it didn’t fix the underlying problem, move down to the next potential fix below.
Method 2: Running Disk Cleanup on the drive
As it turns out, in most cases, the ‘Setup has failed to validate the product key’ error will occur due to an error originating from the AppData\Local\Temp. It’s possible that the upgrading software will throw this error because it already finds unpacked installer files in the temp folder, so it decides that there’s evidence of a security threat and aborts the upgrading process.
If this scenario is applicable, you should be able to fix the issue by running the Disk Cleanup utility on your Windows drive and ensure that the process will end up clearing the Temp folder. After doing so and restarting the machine, the upgrading process should complete without issues.
Here’s what you need to do:
- Press Windows key + R to open up a Run dialogue box. Next, type ‘cleanmgr’ inside the text box and press Enter to open up the Disk Cleanup utility. If you’re prompted by the User Account Control (UAC) window, click Yes to grant admin access.
- Once you arrive at the Disk Cleanup: Drive selection stage, use the drop-down menu under Drives to select your OS drive. It’s typically C: but you can identify it via the Windows logo. With the correct drive selected, click on OK to save the changes.
- When you’re inside the Disk Cleanup window, ensure that the checkboxes associated with Temporary Internet Files and Temporary files are checked.
- Once everything is set up, click on Clean up system files button and then confirm at the UAC prompt.
- You will then be prompted by a different Disk Cleanup icon where you will need to select Temporary Internet Files and Temporary files once again before clicking on Ok.
- At the final prompt, click on Delete files to start this process.
- Wait until the operation is complete, then restart your computer and see if the issue is resolved at the next system startup.
- After the next booting sequence is complete, repeat the upgrading process and see if you are able to do it without encountering the error message.
In case you’re still seeing the ‘Setup has failed to validate the product key’ error, move down to the next method below.
Method 3: Applying the Pkey manually
In case the issue is indeed related to data stored inside log files, it’s probably due to setuperr.log file that is notoriously known for causing the ‘Setup has failed to validate the product key’ error with upgrade attempts using locally stored installation media.
If this scenario is applicable, you should be able to resolve the issue by opening a command prompt and running a command that adds the license key to the folder where the installation media is stored.
Several affected users that also encountered this issue have reported that the issue was resolved entirely once they performed the instructions below. Here’s what you need to do:
- Press Windows key + R to open up a Run dialogue box. Next, type ‘cmd’ inside the text box and press Ctrl + Shift + Enter to open up an elevated Command Prompt. When you see the User Account Control, click Yes to grant administrative privileges.
- Once you’re inside the Elevated Command Prompt, type the following command to navigate to the location where the media installation tool store it’s files:
CD: C:\ESD\
Note: If you forced the Media Creation tool to store it’s filed on a custom location, navigate there instead.
- Next, type the following command and press Enter to attach the product key to the media installation tool that is handling the upgrade:
Setup /pkey xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Note: *X* is simply a placeholder. Replace it with the actual license key that you want to use for the upgrading process.
- Close the elevated CMD, then start the upgrading process again and see if you’re still encountering the ‘Setup has failed to validate the product key’ error.
In case you’re still encountering the same issue, move down to the next method below.
Method 4: Running a DISM scan
Some affected users have confirmed that they were able to resolve the issue after they run a DISM (Deployment Image Servicing and Management) scan on their computer. The success of this method suggests the possibility that this issue can also be caused by an underlying system corruption issue that’ affecting the upgrading process.
DISM is a built-in utility that is very good at fixing dependencies that might interfere with critical OS chores like upgrading to a newer version.
Here’s a quick guide on running a DISM scan in order to fix the ‘Setup has failed to validate the product key’ error:
- Open up a Run dialogue box by pressing Windows key + R. Inside the newly opened window, type ‘cmd’ and press Ctrl + Shift + Enter to open up an elevated Command Prompt. When you’re prompted by the UAC (User Account Control), click Yes to grant administrative privileges.
- Once you’re inside the elevated CMD prompt, type the following commands in order and press Enter after each scan is completed to run a full DISM can:
Dism /Online /Cleanup-Image /CheckHealth Dism /Online /Cleanup-Image /ScanHealth Dism /Online /Cleanup-Image /RestoreHealth
- Once every scan is complete, restart your computer and see if the issue is fixed the next time you try to run the upgrading utility.
In case the same Setup has failed to validate the product key error is still occurring, move down to the final method below.
Method 5: Creating a EI.cfg file for the ISO file
If none of the methods above has allowed you to fix Setup has failed to validate the product key error, it’s probably because the upgrading media that you’re trying to use doesn’t contain a config file that’s mandatory when upgrading from an older Windows version.
In this case, you’ll need to use a decompression utility to extract the Windows 10 ISO and add a .cfg file that will rectify this issue. Once you do so and put the ISO back together, you should no longer encounter the same issue.
Here are step-by-step instructions through the whole thing:
- Use WinRar, WinZip, 7Zip or any other similar utility to extract the ISO file containing the installation media into a folder.
- Press Windows key + R to open up a Run dialogue box. Next, type ‘notepad.exe’ and press Ctrl + Shift + Enter to open up an elevated Notepad window.
- Once you’re inside the notepad window, paste the contents below into it:
[EditionID] [Channel] Retail [VL] 0
- Once the contents have been added, go to File > Save as. Once you’re inside set the Save as type to All Files. Name it ei and ensure that you include the ‘.cfg‘ extension at the end. But before clicking save, ensure that the new file is saved inside the Sources folder of the ISO installation.
- Run the setup.exe file from the same installation media and see if you can complete the process without encountering the Setup has failed to validate the product key error.