SetupDiag is Microsoft’s command-line analyzer for failed Windows 10 and Windows 11 feature upgrades and in-place upgrades. It reads Windows Setup and rollback logs, matches evidence against Microsoft’s diagnostic rules, and reports likely causes. It does not repair Windows, remove blockers, or guarantee a diagnosis. Use it when Windows Setup rolls back or fails; use other tools for ordinary monthly Windows Update failures, hardware eligibility, or system-file repair.
Microsoft’s current instructions and download link are on the SetupDiag documentation page. Download the latest available executable there rather than relying on an old copy left in a previous upgrade folder.
As an Amazon Associate I earn from qualifying purchases.
When SetupDiag is the right tool
Choose SetupDiag when a feature upgrade fails, an in-place upgrade rolls back, or Windows Setup shows an unhelpful error. It can analyze the current computer or a copied log set from another machine. It is also able to process some recovery/reset logs and, with Windows Debugging Tools installed, analyze an upgrade-related memory dump.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →It is not primarily a diagnostic for a cumulative update that failed through Windows Update without Windows Setup activity. It also does not replace troubleshooting for activation, licensing, Windows Update service corruption, malware, failing storage, or general instability. For Windows 11 hardware eligibility, use Microsoft’s PC Health Check and installation guidance.
#1 Best Overall
Requirements and preparation
- The destination Windows release must be a currently supported version. Microsoft’s documented product scope covers Windows 10 and Windows 11; support and destination-version requirements can change.
- .NET Framework 4.7.2 or later must be installed. A newer .NET Framework version satisfies this requirement.
- Run the executable from an elevated Command Prompt.
- Preserve setup logs before using Disk Cleanup or other cleanup tools. Removing
$Windows.~BTorWindows.oldcan remove the evidence and SetupDiag copy.
To inspect the installed .NET Framework 4.x registration, run:
reg.exe query "HKLMSOFTWAREMicrosoftNet Framework SetupNDPv4" /s
Find results Windows Setup already created
Windows Setup can extract and run SetupDiag automatically during a failed upgrade. The executable is normally placed at:
%SystemDrive%$Windows.~btSourcesSetupDiag.exe
Automatic XML output normally appears at:
%WinDir%LogsSetupDiagSetupDiagResults.xml
Automatic findings are also written under:
HKLMSYSTEMSetupSetupDiagResults
If you run SetupDiag manually without /RegPath, its registry data is instead written under:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
HKLMSYSTEMSetupMoSetupVolatileSetupDiag
Manual execution defaults to a text file named SetupDiagResults.log in the executable’s current directory. An automatically generated result is not guaranteed for every failure, especially if setup logs were deleted or the failure occurred before useful evidence was produced.
Run an online analysis on the failed PC
- Download the current
SetupDiag.exefrom Microsoft’s documentation page. - Create a local working directory:
mkdir C:SetupDiag
- Open Command Prompt with Run as administrator.
- Change to the folder containing the executable.
- Run an analysis with an explicit output file:
SetupDiag.exe /Output:C:SetupDiagResults.xml /Format:xml
Use /Format:json for JSON output, or omit /Format for the default text format:
SetupDiag.exe /Output:C:SetupDiagResults.json /Format:json
The destination directory should already exist. Running SetupDiag with no parameters displays its help, while the normal online mode searches the current system for relevant setup logs.
Analyze logs copied from another computer
Specify /LogsPath to select offline analysis. Current versions infer offline mode from this switch; /Mode is deprecated and should not be added to new commands.
Free tools Windows power users keep installed
One-click scans. No signup required.
SetupDiag.exe /Output:C:SetupDiagResults.log /LogsPath:D:TempLogsLogSet1
For XML:
SetupDiag.exe /Output:C:SetupDiagResults.xml /LogsPath:D:TempLogsLogSet1 /Format:xml
/LogsPath may point to a flat folder or to a directory containing subdirectories; SetupDiag searches child directories recursively. Copy as much of the original setup-log tree as possible. Offline analysis is useful when the original PC is unavailable, has rebooted, or its temporary upgrade folders have been removed.
Package results and logs for support
Create a ZIP containing the results and parsed logs with:
SetupDiag.exe /Output:C:SetupDiagResults.log /ZipLogs:True
For manual execution, Microsoft documents /ZipLogs as defaulting to true; Windows Setup runs its automatic instance with /ZipLogs:False. The ZIP is created in the directory from which SetupDiag runs.
Inspect the archive before sharing it. Setup logs can expose machine names, paths, hardware details, user names, installed software, and other environment information. Remove or redact sensitive material before uploading it to a forum, ticket, or third-party service. Use /NoTel when you do not want SetupDiag to send diagnostic telemetry to Microsoft.
Read a SetupDiag result correctly
Start with the matched rule
Look for a statement such as SetupDiag found 1 matching issue, then record the rule name, rule GUID, description, error code, remediation text, and any referenced log file and line. Microsoft’s rule XML can change with newer SetupDiag releases, so a rule list published elsewhere is not permanent.
Use phase and operation to locate the failure
Results can include values such as Last Setup Phase = Downlevel and Last Setup Operation = Gather data. Downlevel runs under the original operating system; Safe OS runs in a temporary setup environment; Rollback indicates that Setup reverted the attempted upgrade. The phase and operation often identify the relevant log family more reliably than a hexadecimal code alone.
Treat the rule as a lead
A matched rule is evidence-based guidance, not proof that the named item alone caused the failure. Confirm the finding against the current machine and the associated logs. Representative rules include:
CompatBlockedApplication— an application must be removed or updated before setup can continue.CompatBlockedDriver— a driver or driver package is incompatible.BitLockerHardblock— BitLocker state or compatibility blocks the target release.SafeModeHardblockandAuditModeHardblock— setup was started in an unsupported mode.VHDHardblockandPortableWorkspaceHardblock— Windows is running from a virtual hard disk or portable workspace that setup cannot upgrade in that configuration.InsufficientSystemPartitionDiskSpaceHardblock— the system partition lacks required space.
When multiple failures are reported, Microsoft says the last failure is typically the fatal one. Do not automatically “fix” the first warning without checking the final failure and its timestamp.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesWhen there is no match or the result looks wrong
SetupDiag cannot find logs
- The temporary
$Windows.~BTdirectory orWindows.oldwas cleaned up. - The wrong folder was supplied to
/LogsPath, or the copied tree is incomplete. - The upgrade never reached a phase that generated the expected logs.
- The process lacks access to the supplied path.
Download the current executable, locate the complete Panther and rollback trees, copy them locally, and rerun with /LogsPath. Add /Verbose if SetupDiag itself provides too little detail. Quote paths containing spaces:
SetupDiag.exe /Output:"C:ToolsSetupDiagSetupDiag ResultsResults.log"
For UNC output paths, the account running the elevated process must have access. A local output folder is usually the simplest first test.
No matching rule
“No matching issue” means the available evidence did not match a known rule strongly enough; it does not mean the logs are useless. Open the result and note the selected setup log, then inspect the original files manually.
A component appears to be blamed incorrectly
Confirm that the application or driver is still installed, that a named driver is active rather than merely present in the Driver Store, and that its timestamp matches the failure. Check whether the event occurred during Downlevel, Safe OS, first boot, or Rollback, and whether the rule represents a hard block, warning, or inferred fatal error.
Manual log analysis after SetupDiag
Common locations vary by phase and cleanup state, but include:
C:$WINDOWS.~BTSourcesPanther
C:$WINDOWS.~BTSourcesRollback
C:WindowsPanther
C:WindowsPantherNewOSRollback
setupact.log is generally the activity log and often contains the context needed to reconstruct the failure. setuperr.log records setup errors but may be sparse. Search both for Error, Warning, Failure, Rollback, and the exact hexadecimal code from SetupDiag. Correlate timestamps with the final phase and operation rather than treating every warning as causal.
Recovery and memory-dump scenarios
Reset and recovery logs
Use /Scenario:Recovery when processing reset or recovery logs instead of normal upgrade logs:
SetupDiag.exe /Output:C:SetupDiagRecoveryResults.log /LogsPath:D:TempCabsPBR_Log /Scenario:Recovery
For an online recovery analysis:
SetupDiag.exe /Scenario:Recovery /Format:xml
Upgrade-related bug checks
If setup created setupmem.dmp after a bug check, install Windows Debugging Tools on the analysis computer and run SetupDiag offline. Relevant dump locations can include:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match%SystemDrive%$Windows.~btSourcesRollback
%WinDir%PantherNewOSRollback
SetupDiag.exe /Output:C:SetupDiagDumpdebug.log /LogsPath:D:Dump
This is an advanced branch for deployment or crash analysis, not part of the normal first-pass workflow.
Rank #4
SetupDiag compared with Microsoft’s other upgrade tools
| Tool or method | Best use | What it does not provide |
|---|---|---|
| SetupDiag | Classifying failed Windows Setup upgrades from logs | Automatic repair or guaranteed diagnosis |
| PC Health Check | Checking Windows 11 hardware eligibility | Detailed explanation of a failed setup transaction |
| Windows 11 Installation Assistant | Performing a supported Windows 11 upgrade when offered | Post-failure log analysis |
| Installation media | In-place upgrade from Windows or creation of reusable media | A substitute for investigating rollback logs |
| Manual Panther and rollback analysis | Exact timestamps, phase transitions, driver, servicing, and enterprise investigations | The quick rule-based summary SetupDiag provides |
Running setup.exe from within Windows can preserve files and applications by default. Booting from installation media is a different operation and can perform a clean installation that removes them; see Microsoft’s installation guidance.
Windows 10 support context
Microsoft’s support guidance lists October 14, 2025 as the end of Windows 10 support. In 2026, verify the target release and support status before planning an upgrade or interpreting SetupDiag’s supported-version requirements.
Frequently Asked Questions
Does SetupDiag fix a failed upgrade?
No. It analyzes Windows Setup logs and reports likely causes; remediation remains manual.
Can SetupDiag analyze logs from another PC?
Yes. Copy the setup-log tree and specify its root with /LogsPath for offline analysis.
Why did my SetupDiag result disappear?
Cleanup may have removed $Windows.~BT or Windows.old. Preserve logs and results before running cleanup tools.
Is SetupDiag useful for every Windows Update error?
No. It is intended for Windows Setup upgrade and related recovery logs, not ordinary monthly update failures without setup activity.
The Bottom Line
Use SetupDiag as a fast, rule-based first pass for a failed Windows feature upgrade: preserve the logs, run the current executable with XML or JSON output, identify the rule, phase, operation, and final failure, then verify the lead in Panther and rollback logs. When no rule matches, switch to manual Setup log analysis rather than assuming the upgrade left no clues.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




