How to Use SetupDiag to Diagnose Windows 10 Upgrade Issues

SetupDiag is a free diagnostic tool by Microsoft that is designed to find and parse Windows 10 setup log files to determine why an upgrade or update failed to install on a computer system.

SetupDiag works only on devices running Windows 10. The second requirement is that it depends on the Microsoft .NET Framework 4.6 which needs to be installed on the device it is run on.

How to Use SetupDiag to Diagnose Windows 10 Upgrade Issues LISFuoK

If you run SetupDiag without parameters, it attempts to locate log files that Windows 10 creates during the upgrade process in the default folders on the device.

The program creates a results.log file in its directory when it completes the scan which includes upgrade issues that it detected in the log files during parsing.

SetupDiag creates a zip archive of all log files that it processed on top of that which it saves as Logs.zip in the same directory as well.

SetupDiag does is parse the following directories for log files:


  • \$Windows.~bt\sources\panther
  • \$Windows.~bt\Sources\Rollback
  • \Windows\Panther
  • \Windows\Panther\NewOS


SetupDiag can also be used to debug minidump files that Windows 10 may create during the upgrade process. Windows 10 creates the file setupmem.dmp either in %SystemDrive%$Windows.~bt\Sources\Rollback or in %WinDir%\Panther\NewOS\Rollback depending on when the upgrade process is stopped.

Here are some examples:


  • SetupDiag.exe -- the core command. It will run in online mode which means that it tries to find upgrade logs on the target machine in the directories mentioned above.
  • SetupDiag.exe /Output:C:\SetupDiag\Results.log /Mode:Offline /LogsPath:D:\Temp\Logs\LogSet1 - the command runs SetupDiag in offline mode. It will scan the directory LogSet1 for matching log files and issues.
  • SetupDiag.exe /Output:C:\SetupDiag\Dumpdebug.log /Mode:Offline /LogsPath:D:\Dump -- the command analyzes the setupmem.dmp file found in d:\dump.


SetupDiag uses a set of rules files to find matches in upgrade logs. Rules have a name and associated unique identifier.

The reliance on rules means that SetupDiag can only identify issues that are defined in its set of rules. Microsoft lists a total of 26 unique identifiers on the Microsoft Docs website which SetupDiag identifies in its current version.

SetupDiag may speed up the diagnosing of upgrade related issues on Windows 10 machines significantly. It reduces the time it takes to parse the log files but may still require additional research to repair the detected issue.


Did you find this tutorial helpful? Don’t forget to share your views with us.