16 KiB
title, description, keywords, ms.prod, ms.mktglfcycl, ms.sitesec, ms.pagetype, author, ms.date, ms.localizationpriority
title | description | keywords | ms.prod | ms.mktglfcycl | ms.sitesec | ms.pagetype | author | ms.date | ms.localizationpriority |
---|---|---|---|---|---|---|---|---|---|
SetupDiag | How to use the SetupDiag tool to diagnose Windows Setup errors | deploy, troubleshoot, windows, 10, upgrade, update, setup, diagnose | w10 | deploy | library | deploy | greg-lindsay | 03/30/2018 | high |
SetupDiag
Applies to
- Windows 10
Note
This is a 300 level topic (moderate advanced).
See Resolve Windows 10 upgrade errors for a full list of topics in this article.
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 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.
See the Release notes section at the bottom of this topic for information about updates to this tool.
Requirements
-
The destination OS must be Windows 10.
-
.NET Framework 4.6 must be installed. If you are not sure what version of .NET is currently installed, see How to: Determine Which .NET Framework Versions Are Installed. You can also use the following command-line query to display the installed v4 versions:
reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP\v4" /s
Parameters
Parameter | Description |
---|---|
/? |
|
/Output:<path to results file> |
|
/Mode:<Offline | Online> |
|
/LogsPath:<Path to logs> |
|
/ZipLogs:<True | False> |
|
/Verbose |
|
Examples:
In the following example, SetupDiag is run with default parameters (online mode, results file is SetupDiagResults.log in the same folder where SetupDiag is run).
SetupDiag.exe
In the following example, SetupDiag is specified to run in Online mode (this is the default). It will know where to look for logs on the current (failing) system, so there is no need to gather logs ahead of time. A custom location for results is specified.
SetupDiag.exe /Output:C:\SetupDiag\Results.log /Mode:Online
The following example uses the /Output parameter to save results to a path name that contains a space:
SetupDiag /Output:"C:\Tools\SetupDiag\SetupDiag Results\Results.log"
The following example specifies that SetupDiag is to run in offline mode, and to process the log files found in D:\Temp\Logs\LogSet1.
SetupDiag.exe /Output:C:\SetupDiag\Results.log /Mode:Offline /LogsPath:D:\Temp\Logs\LogSet1
Log files
Windows Setup Log Files and Event Logs has information about where logs are created during Windows Setup. For offline processing, you should run SetupDiag against the contents of the entire folder. For example, 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
If you copy the parent folder and all sub-folders, SetupDiag will automatically search for log files in all subdirectories.
Setup bug check analysis
When Microsoft Windows encounters a condition that compromises safe system operation, the system halts. This condition is called a bug check. It is also commonly referred to as a system crash, a kernel error, a Stop error, or BSOD. Typically a hardware device, hardware driver, or related software causes this error.
If crash dumps are enabled on the system, a crash dump file is created. If the bug check occurs during an upgrade, Windows Setup will extract a minidump (setupmem.dmp) file. SetupDiag can also debug these setup related minidumps.
To debug a setup related bug check, you must:
- Specify the /Mode:Offline and /LogsPath parameters. You cannot debug memory dumps in online mode.
- Gather the setup memory dump file (setupmem.dmp) from the failing system.
- Setupmem.dmp will be created in either %SystemDrive%$Windows.~bt\Sources\Rollback, or in %WinDir%\Panther\NewOS\Rollback depending on when the bug check occurs.
- Install the Windows Debugging Tools on the computer that runs SetupDiag.
In the following example, the setupmem.dmp file is copied to the D:\Dump directory and the Windows Debugging Tools are installed prior to running SetupDiag:
SetupDiag.exe /Output:C:\SetupDiag\Dumpdebug.log /Mode:Offline /LogsPath:D:\Dump
Known issues
- Some rules can take a long time to process if the log files involved as large.
- SetupDiag only outputs data in a text format. If another format is desired, please provide this feedback.
- If the failing computer is opted into the Insider program and getting regular pre-release updates, or an update is already pending on the computer when SetupDiag is run, it can encounter problems trying to open these log files. This will likely cause a failure to determine a root cause. In this case, try gathering the log files and running SetupDiag in offline mode.
Sample output
The following is an example where SetupDiag is run in offline mode. In this example, it is found that disk space is not sufficient to complete Windows Setup:
C:\setupdiag>SetupDiag /Output:C:\setupdiag\results.log /Mode:Offline /LogsPath:C:\setupdiag\logfiles
SetupDiag v1.00
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 1 setupact.logs.
Processing setupact.log 1 of 1
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: HardblockApplication.
...No match.
SetupDiag: processing rule: HardblockDeviceOrDriver.
...No match.
SetupDiag: processing rule: HardblockMismatchedLanguage.
..No match.
SetupDiag: processing rule: HardblockFlightSigning.
..No match.
SetupDiag: processing rule: DiskSpaceBlockInDownLevel.
...
Matching Profile found: DiskSpaceBlockInDownLevel - 6080AFAC-892E-4903-94EA-7A17E69E549E
Warning: Found Disk Space Hard Block.
Warning: You must free up at least 6603 MB of space on the System Drive, and try again.
SetupDiag found 1 matching issue.
SetupDiag results were logged to: c:\setupdiag\results.log
Logs ZipFile created at: c:\setupdiag\Logs.zip
Rules
When searching log files, SetupDiag uses a set of rules to match known issues. These rules are contained in the rules.xml file which is extracted when SetupDiag is run. The rules.xml file might be updated as new versions of SetupDiag are made available. See Release notes for more information.
Each rule name and its associated unique rule identifier are listed with a description of the known upgrade-blocking issue. In the rule descriptions, the term "down-level" refers to the first phase of the upgrade process, which runs under the starting OS.
- CompatScanOnly - FFDAFD37-DB75-498A-A893-472D49A1311D
- This rule indicates that setup.exe was called with a specific command line parameter that indicated setup was to do a compat scan only, not an upgrade.
- BitLockerHardblock - C30152E2-938E-44B8-915B-D1181BA635AE
- This is a block when the target OS does not support BitLocker, yet the host OS has BitLocker enabled.
- VHDHardblock - D9ED1B82-4ED8-4DFD-8EC0-BE69048978CC
- This block happens when the host OS is booted to a VHD image. Upgrade is not supported when the host OS is booted from a VHD image.
- PortableWorkspaceHardblock - 5B0D3AB4-212A-4CE4-BDB9-37CA404BB280
- This indicates that the host OS is booted from a Windows To-Go device (USB key). Upgrade is not supported in the Windows To-Go environment.
- AuditModeHardblock - A03BD71B-487B-4ACA-83A0-735B0F3F1A90
- This block indicates that the host OS is currently booted into Audit Mode, a special mode for modifying the Windows state. Upgrade is not supported from this state.
- SafeModeHardblock - 404D9523-B7A8-4203-90AF-5FBB05B6579B
- This block indicates that the host OS is booted to Safe Mode, where upgrade is not supported.
- InsufficientSystemPartitionDiskSpaceHardblock - 3789FBF8-E177-437D-B1E3-D38B4C4269D1
- This block is encountered when setup determines the system partition (where the boot loader files are stored) does not have enough space to be serviced with the newer boot files required during the upgrade process.
- HardblockApplication - D6FBF046-5927-4FCD-B998-FE21CA7F6AC9
- This rule indicates the host OS had one or more hard blocked applications that need to be uninstalled prior to continuing. This typically is only a problem when /Quiet is specified on the command line.
- HardblockDeviceOrDriver - ED3AEFA1-F3E2-4F33-8A21-184ADF215B1B
- This indicates a device driver that is loaded on the host OS is not compatible with the newer OS version and needs to be removed prior to the upgrade.
- HardblockMismatchedLanguage - 60BA8449-CF23-4D92-A108-D6FCEFB95B45
- This rule indicates the host OS and the target OS language editions do not match.
- HardblockFlightSigning - 598F2802-3E7F-4697-BD18-7A6371C8B2F8
- This rule indicates the target OS is a pre-release, Windows Insider build, and the target machine has Secure Boot enabled. This will block the pre-release signed build from booting if installed on the machine.
- DiskSpaceBlockInDownLevel - 6080AFAC-892E-4903-94EA-7A17E69E549E
- This failure indicates the system ran out of disk space during the down-level operations of upgrade.
- DiskSpaceFailure - 981DCBA5-B8D0-4BA7-A8AB-4030F7A10191
- This failure indicates the system drive ran out of available disk space at some point after the first reboot into the upgrade.
- DeviceInstallHang - 37BB1C3A-4D79-40E8-A556-FDA126D40BC6
- This failure rule indicates the system hung or bug checked during the device installation phase of upgrade.
- DebugSetupMemoryDump - C7C63D8A-C5F6-4255-8031-74597773C3C6
- This offline only rule indicates a bug check occurred during setup. If the debugger tools are available on the system, SetupDiag will debug the memory dump and provide details.
- DebugSetupCrash - CEEBA202-6F04-4BC3-84B8-7B99AED924B1
- This offline only rule indicates that setup itself encountered a failure that resulted in a process memory dump. If the debugger tools are installed on the system, SetupDiag will debug the memory dump and give further details.
- DebugMemoryDump - 505ED489-329A-43F5-B467-FCAAF6A1264C
- This offline only rule is for any memory.dmp file that resulted during the setup/upgrade operation. If the debugger tools are installed on the system, SetupDiag will debug the memory dump and give further details.
- FindDebugInfoFromRollbackLog - 9600EB68-1120-4A87-9FE9-3A4A70ACFC37
- This rule will determine and give details when a bug check occurs during the setup/upgrade process that resulted in a memory dump, but without the requirement of the debugger package being on the executing machine.
- AdvancedInstallerFailed - 77D36C96-32BE-42A2-BB9C-AAFFE64FCADC
- Finds fatal advanced installer operations that cause setup failures.
- FindSuccessfulUpgrade - 8A0824C8-A56D-4C55-95A0-22751AB62F3E
- Determines if the given setup was a success or not based off the logs.
- FindSetupHostReportedFailure - 6253C04F-2E4E-4F7A-B88E-95A69702F7EC
- Gives information about failures surfaced early in the upgrade process by setuphost.exe
- FindDownlevelFailure - 716334B7-F46A-4BAA-94F2-3E31BC9EFA55
- Gives failure information surfaced by SetupPlatform, later in the down-level phase.
- FindAbruptDownlevelFailure - 55882B1A-DA3E-408A-9076-23B22A0472BD
- Gives last operation failure information when the system fails in the down-level, but the log just ends abruptly.
- FindSetupPlatformDownlevelFailure - 307A0133-F06B-4B75-AEA8-116C3B53C2D1
- Gives last operation and phase failure information when Setup indicates a down-level failure.
- FindSetupPlatformDownlevelFailedOperation - 087610ED-329A-4DE9-A54C-38A3A07B5B8B
- Gives last phase and error information when Setup indicates a down-level failure.
- FindRollbackFailure - 3A43C9B5-05B3-4F7C-A955-88F991BB5A48
- Gives last operation, failure phase and error information when a rollback occurs.
Release notes
03/30/2018 - SetupDiag v1.00 released with 26 rules, as a standalone tool available from the Download Center.
Related topics
Resolve Windows 10 upgrade errors: Technical information for IT Pros