SetupDiag.exe is a standalone diagnostic tool for finding details about why a Windows 11/10 upgrade failed to install. As you know, the update process in Windows 11/10 has been thoroughly streamlined but that doesn’t mean it’s always problem-free and hence, the tool.

How to use SetupDiag.exe to diagnose Windows Update errors

SetupDiag.exe requires Microsoft .NET Framework 4 to be installed on your PC. The tool works by examining Windows Setup log files and parsing them to find the root cause of a failure to update or upgrade the computer to Windows 10. SetupDiag can be run on the computer that failed to update, or you can export logs from the computer to another location and run SetupDiag in offline mode. Once you have the tool up and running, it can be used for performing checks and analyses also. Whenever Windows comes across a situation that likely intends to compromise safe system operation, the system halts. This condition is called a bug check. It is also commonly referred to as a- The typical cause for this issue is either a hardware device, hardware driver, or some related software. If the bug check occurs during an upgrade, Windows Setup extracts a minidump (setupmem.dmp) file. To debug a setup related bug check, one must: Specify the /Mode: Offline and /LogsPath parameters and try gathering the setup memory dump file (setupmem.dmp) from the failing system. Please note that you cannot debug memory dumps in online mode. You will find Setupmem.dmp under either Or depending on when the bug check occurs. Thereafter, you can install the Windows Debugging Tools on the computer that runs SetupDiag. If you chose to run the tool without parameters, it attempts to locate log files that Windows 11/10 creates during the upgrade process in the default folders on the device. Once the scan is over, SetupDiag will generate Log.zip, SetupDiag.exe.config, and SetupDiagResults.log in the folder where the SetupDiag.exe is located. The program also creates a results.log file in its directory after the completion of the scanning process. Any upgrade issues encountered are rapidly detected in the log files during parsing. Apart from the above, SetupDiag creates a zip archive of all logfiles that is processed and also saves Logs.zip file in the same directory as well. Lastly, there’s an option to even run SetupDiag.exe in offline mode to parse folders copied from another device.

SetupDiag tool is now included with Windows Setup

In Windows 10 and Windows 11, SetupDiag tool is included with Windows Setup. During the upgrade process, Windows Setup will extract all its sources files to the %SystemDrive%$Windows.~bt\Sources directory. Now, setupdiag.exe is also installed in this folder and in case the upgrade fails, SetupDiag tool will automatically run to find out why it failed. In this scenario, the following parameters are used: The resulting SetupDiag analysis can be found at: and in the Registry under

If the upgrade process proceeds normally, the Sources directory including setupdiag.exe is moved under %SystemDrive%\Windows.Old for cleanup.If the Windows.old directory is deleted later, setupdiag.exe will also be removed.

For full details on how to use SetupDiag.exe you can read this Microsoft Doc.

How to use SetupDiag exe to diagnose Windows Upgrade errors - 1How to use SetupDiag exe to diagnose Windows Upgrade errors - 17