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.

The program can be run on the computer that failed to upgrade or on another computer if relevant log files are available (for example, by copying them to the PC).

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.

With the upcoming Windows 10 version 1803 just around the corner, it may be the right tool to have in your arsenal if you run into upgrading issues.

Using SetupDiag

setupdiag

You can run SetupDiag directly after download. If you run it 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.

The command line window lists those as well, but the window is closed automatically when the program finishes the scan.

Check out our list of Windows 10 upgrade log files to find out more about those. Basically, what SetupDiag does is parse the following directories for log files:

  • $Windows.~btsourcespanther
  • $Windows.~btSourcesRollback
  • WindowsPanther
  • WindowsPantherNewOS

You may run the application in offline mode to parse folders copied from another device. The tool parses one folder only if you copy individual folders, but if you copy the parent folder, it will include all logs found in all directories of the directory structure.

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.~btSourcesRollback or in %WinDir%PantherNewOSRollback 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:SetupDiagResults.log /Mode:Offline /LogsPath:D:TempLogsLogSet1 - the command runs SetupDiag in offline mode. It will scan the directory LogSet1 for matching log files and issues.
  • SetupDiag.exe /Output:C:SetupDiagDumpdebug.log /Mode:Offline /LogsPath:D:Dump -- the command analyzes the setupmem.dmp file found in d:dump.

How it works

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.

If the program fails to find the root cause for the upgrade issue, check out our how to analyze Windows 10 upgrade errors guide which offers information on diagnosing issues manually.

Closing Words

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.

Some issues, like not enough disk space, are easy enough to fix but others may require extensive research and repair operations.

The post Use SetupDiag to diagnose Windows 10 upgrade issues appeared first on gHacks Technology News.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.