Diagnose Windows 10 Upgrade Issues with SetupDiag

The new super fast cadence of modern Windows versions and short life cycle has forced users to perform full OS upgrades twice a year. For example, the most recent stable Windows 10 release as of this writing is version 1803, "April 2018 Update". However, we are already expecting version 1809 at the end of this year. To help users perform upgrades smoothly, Microsoft has released a new diagnostic tool, SetupDiag.

Setupdiag

The upgrade procedure for Windows 10 may have issues, making the installation of a new build impossible. If you are a Windows Insider in the Fast Ring, you receive new builds much faster than other. They are of pre-release quality and may contain serious issues.

When Setup fails to upgrade the OS, Windows shows an error code, and terminates the process. More details can usually be found in the setup log. Unfortunately, these logs are not user friendly. It is hard to read and understand what is going on and filter out the successful events. For this purpose, the SetupDiag tool can be used.

SetupDiag.exe is a standalone diagnostic tool that can be used to obtain details about why a Windows 10 upgrade was unsuccessful.

SetupDiag works by examining Windows Setup log files. It attempts to parse these log files to determine the root cause of 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.

SetupDiag can be downloaded from the following web site:

Download SetupDiag

The tool supports the following parameters:

ParameterDescription
/?
  • Displays interactive help
/Output:<path to results file>
  • This optional parameter enables you to specify the output file for results. This is where you will find what SetupDiag was able to determine. Only text format output is supported. UNC paths will work, provided the context under which SetupDiag runs has access to the UNC path. If the path has a space in it, you must enclose the entire path in double quotes (see the example section below).
  • Default: If not specified, SetupDiag will create the file SetupDiagResults.log in the same directory where SetupDiag.exe is run.
/Mode:<Offline | Online>
  • This optional parameter allows you to specify the mode in which SetupDiag will operate: Offline or Online.
  • Offline: tells SetupDiag to run against a set of log files already captured from a failed system. In this mode you can run anywhere you have access to the log files. This mode does not require SetupDiag to be run on the computer that failed to update. When you specify offline mode, you must also specify the /LogsPath: parameter.
  • Online: tells SetupDiag that it is being run on the computer that failed to update. SetupDiag will attempt find log files and resources in standard Windows locations, such as the %SystemDrive%$Windows.~bt directory for setup log files.
  • Log file search paths are configurable in the SetupDiag.exe.config file, under the SearchPath key. Search paths are comma separated. Note: A large number of search paths will extend the time required for SetupDiag to return results.
  • Default: If not specified, SetupDiag will run in Online mode.
/LogsPath:<Path to logs>
  • This optional parameter is required only when /Mode:Offline is specified. This tells SetupDiag.exe where to find the log files. These log files can be in a flat folder format, or containing multiple subdirectories. SetupDiag will recursively search all child directories. This parameter should be omitted when the /Mode:Online is specified.
/ZipLogs:<True | False>
  • This optional parameter tells SetupDiag.exe to create a zip file continuing its results and all the log files it parsed. The zip file is created in the same directory where SetupDiag.exe is run.
  • Default: If not specified, a value of 'true' is used.
/Verbose
  • This optional parameter will output much more data to the log file produced by SetupDiag.exe. By default SetupDiag will only produce a log file entry for serious errors. Using /Verbose will cause SetupDiag to always produce a log file with debugging details, which can be useful when reporting a problem with SetupDiag.

If your build upgrade failed, run the tool and see the SetupDiagResults.log file in the same folder where SetupDiag is stored.

Setupdiag Running

You can specify the location of the log file by using the Output argument:

SetupDiag.exe /Output:C:\SetupDiag\Results.log /Mode:Online

Also, you can override the Windows logs location (e.g. to analyze logs of an unbotable OS) as follows:

SetupDiag.exe /Output:C:\SetupDiag\Results.log /Mode:Offline /LogsPath:D:\Temp\Logs\LogSet1

Depending on when the upgrade failed, copy one of the following folders to your offline location:

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

The following example demonstrates that SetupDiag's log started in offline mode. In this example, there is an application warning, but since setup is executed in /quiet mode, it becomes a block. Instructions to resolve the problem are provided by SetupDiag in the output.

C:\SetupDiag>SetupDiag.exe /Output:C:\SetupDiag\Results.log /Mode:Offline /LogsPath:C:\Temp\BobMacNeill

SetupDiag v1.01
Copyright (c) Microsoft Corporation. All rights reserved

Searching for setup logs, this can take a minute or more depending on the number and size of the logs...please wait.
        Found 4 setupact.logs.
        Processing setupact.log at: c:\temp\bobmacneill\$WINDOWS.~BT\Sources\Panther\setupact.log
        Processing setupact.log at: c:\temp\bobmacneill\Panther\setupact.log
        Processing setupact.log at: c:\temp\bobmacneill\Panther\NewOs\Panther\setupact.log
        Processing setupact.log at: c:\temp\bobmacneill\Panther\UnattendGC\setupact.log
Found c:\temp\bobmacneill\$WINDOWS.~BT\Sources\Panther\setupact.log with update date 03/29/2018 23:13:58 and CV: H2X+YsWL/UOkj/8X to be the correct setup log.
Gathering information from setup logs.

SetupDiag: processing rule: CompatScanOnly.
..No match.

SetupDiag: processing rule: BitLockerHardblock.
..No match.

SetupDiag: processing rule: VHDHardblock.
..No match.

SetupDiag: processing rule: PortableWorkspaceHardblock.
..No match.

SetupDiag: processing rule: AuditModeHardblock.
..No match.

SetupDiag: processing rule: SafeModeHardblock.
..No match.

SetupDiag: processing rule: InsufficientSystemPartitionDiskSpaceHardblock.
..No match.

SetupDiag: processing rule: CompatBlockedApplicationAutoUninstall.
....No match.

SetupDiag: processing rule: CompatBlockedApplicationDismissable.
....

Matching Profile found: CompatBlockedApplicationDismissable - EA52620B-E6A0-4BBC-882E-0686605736D9
Warning: Found Application Block for: "Microsoft Endpoint Protection".
This is a dismissible message when not running setup.exe in "/quiet" mode.
Consider specifying "/compat /ignore warning" to ignore these dismissible warnings.
You must manually uninstall "Microsoft Endpoint Protection" before continuing with the installation/update, or change the command line parameters to ignore warnings.
For more information about Setup command line switches, see here:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options

SetupDiag: processing rule: CompatBlockedApplicationManualUninstall.
....No match.

SetupDiag: processing rule: HardblockDeviceOrDriver.
....No match.

SetupDiag: processing rule: HardblockMismatchedLanguage.
..No match.

SetupDiag: processing rule: HardblockFlightSigning.
..No match.

SetupDiag: processing rule: DiskSpaceBlockInDownLevel.
..No match.

SetupDiag: processing rule: DiskSpaceFailure.
..No match.

SetupDiag: processing rule: DebugSetupMemoryDump.
.No match.

SetupDiag: processing rule: DebugSetupCrash.
.No match.

SetupDiag: processing rule: DebugMemoryDump.
.No match.

SetupDiag: processing rule: DeviceInstallHang.
..No match.

SetupDiag: processing rule: BootFailureDetected.
.No match.

SetupDiag: processing rule: FindDebugInfoFromRollbackLog.
.No match.

SetupDiag: processing rule: AdvancedInstallerFailed.
..No match.

SetupDiag: processing rule: FindMigApplyUnitFailure.
..No match.

SetupDiag: processing rule: FindMigGatherUnitFailure.
..No match.

SetupDiag: processing rule: OptionalComponentInstallFailure.
..No match.

SetupDiag: processing rule: CriticalSafeOSDUFailure.
..No match.

SetupDiag: processing rule: UserProfileCreationFailureDuringOnlineApply.
..No match.

SetupDiag: processing rule: WimMountFailure.
..No match.

SetupDiag: processing rule: FindSuccessfulUpgrade.
..No match.

SetupDiag: processing rule: FindSetupHostReportedFailure.
..No match.

SetupDiag: processing rule: FindDownlevelFailure.
..No match.

SetupDiag: processing rule: FindAbruptDownlevelFailure.
....Error: SetupDiag reports abrupt down-level failure. Last Operation: Finalize, Error: 0xC1900208 - 0x4000C
Failure Data: Last Operation: Finalize, Error: 0xC1900208 - 0x4000C
Refer to https://docs.microsoft.com/en-us/windows/deployment/upgrade/upgrade-error-codes for error information.

SetupDiag: processing rule: FindSetupPlatformFailedOperationInfo.
..No match.

SetupDiag: processing rule: FindRollbackFailure.
..No match.

SetupDiag found 2 matching issues.

Warning: Found Application Block for: "Microsoft Endpoint Protection".
This is a dismissible message when not running setup.exe in "/quiet" mode.
Consider specifying "/compat /ignore warning" to ignore these dismissible warnings.
You must manually uninstall "Microsoft Endpoint Protection" before continuing with the installation/update, or change the command line parameters to ignore warnings.
For more information about Setup command line switches, see here:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-command-line-options
Error: SetupDiag reports abrupt down-level failure. Last Operation: Finalize, Error: 0xC1900208 - 0x4000C
Failure Data: Last Operation: Finalize, Error: 0xC1900208 - 0x4000C
Refer to https://docs.microsoft.com/en-us/windows/deployment/upgrade/upgrade-error-codes for error information.

SetupDiag results were logged to: c:\setupdiag\results.log
Logs ZipFile created at: c:\setupdiag\Logs_14.zip

Source: docs.microsoft.com

Leave a Reply

Your email address will not be published. Required fields are marked *