Get all your news in one place.
100’s of premium titles.
One app.
Start reading
Windows Central
Windows Central
Technology
Mauro Huculak

How to use SetupDiag to determine upgrade problems on Windows 10

Check version of .NET Framework.

Although Windows 10 usually provides an error code about an upgrade or update failure, sometimes, it won't show anything, leaving you guessing the root of the problem. This can be very frustrating, especially if you're trying to install a new version of the operating system.

However, Microsoft offers an optional tool known as SetupDiag, which is available for free and designed to diagnose and determine the exact reason an update or upgrade failed to install.

SetupDiag works by analyzing the Windows Setup logs (left behind by the installation process) and checking the information against a database of known issues to determine the reason for the installation failure, which you can use to find a solution for the problem.

At the time of this writing, the SetupDiag tool includes a database (rules.xml) with many rules to match known issues, but the rules are updated as new tool versions roll out.

In this how-to guide, I will walk you through the steps to use the SetupDiag tool to understand why an update or upgrade failed to install and help you find a solution.

How to check Windows 10 upgrade failure using SetupDiag

The process of using SetupDiag is straightforward. You only need to make sure that the required version of the .NET Framework is installed, then run the tool, and review the results.

Confirm .NET Framework version

To confirm that the device meets the minimum .NET Framework requirements, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to reveal the version of .NET installed and press Enter: reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP\v4" /s
  4. Check the "Version" field to see if it reads something higher than 4.8.xxxxx to confirm you can run the tool.
(Image credit: Mauro Huculak)

If the device includes .NET 4.6 or higher, then continue with the steps below. Otherwise, download the .NET version 4.8 or higher offline installer, and double-click the file to install the software.

Run SetupDiag tool

To run the SetupDiag tool on Windows 10, use these steps:

  1. Open SetupDiag download page.
  2. Click the Download SetupDiag button.
(Image credit: Mauro Huculak)
  1. Select an empty folder to download the files.
  • Quick tip: You can always create a new folder using the "New folder" button from the "Save As" dialog box and name it: "SetupDiag".
  1. Click the Save button.
  2. Open File Explorer.
  3. Browse to the downloaded file location.
  4. Right-click the "SetupDiag.exe" and select the Run as administrator option.
(Image credit: Mauro Huculak)

Once you complete the steps, the tool will run immediately without the need for installation or user interaction. It'll check the available rules against the logs of the failed installation, and the SetugDiag will close automatically.

After the process completes, you'll have three new files, including the "Log.zip," "SetupDiag.exe.config," and "SetupDiagResults.log," inside the folder where you downloaded the "SetupDiag.exe" file.

Run SetupDiag from Command Prompt

If after running the tool, you can't find the log files, then you may have to run the tool through Command Prompt. Here's how:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to open the folder directory where you downloaded the tool and press Enter: cd %USERPROFILE%\Downloads\SetupDiag 

In the command, update the path according to the folder location where you saved the tool.

  1. Type the following command to run the tool and create a log file with the results and press Enter: SetupDiag.exe /Output:%USERPROFILE%\Downloads\SetupDiag\SetupDiagResults.log
(Image credit: Mauro Huculak)

In the command, update the path to the location where you saved the tool.

After you complete the steps, the tool will run and create a log file with all the results. This Microsoft support page has more command samples for using this tool.

Check SetupDiag results

To review the SetupDiag results, use these steps:

  1. Open File Explorer.
  2. Browse to the downloaded file location.
  3. Right-click the SetupDiagResults.log file and select the Open option.
(Image credit: Mauro Huculak)

After you complete the steps, the log file will open with the results that the tool was able to identify based on the known rules.

For example, for this guide, I started the upgrade process to a newer version of Windows 10 and then forced the device to shut down. The setup process reverted to the previous version, and error logs were saved on the device.

The first part of the file contains system information about your computer, including device name, manufacturer, BIOS (UEFI) version, the original version of Windows 10, registered antivirus, upgrade date, and more.

(Image credit: Mauro Huculak)

Then, you'll find the details of the error below the system information. In this case, we can see that the installation process failed while applying the new files since the device was forced to shut down, and we can see the error code (0xC1900101-0x2000C) of the problem.

Depending on the error, you'll see different details that will help you determine the root cause and steps to resolve the problem.

If you don't see recommendations to fix the issue, follow the link provided, use the error code, or research the problem online using any information available.

More resources

For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources: 

Sign up to read this article
Read news from 100’s of titles, curated specifically for you.
Already a member? Sign in here
Related Stories
Top stories on inkl right now
One subscription that gives you access to news from hundreds of sites
Already a member? Sign in here
Our Picks
Fourteen days free
Download the app
One app. One membership.
100+ trusted global sources.