Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Redmond desk7 min

SetupDiag: How to Use Microsoft’s Tool to Analyze Windows Upgrade Logs

Microsoft SetupDiag analyzes Windows 10 and 11 upgrade logs to identify likely blockers. This guide covers installation, online and offline commands, output formats, recovery scenarios, and manual log follow-up.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.~BT or Windows.old can 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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

  1. Download the current SetupDiag.exe from Microsoft’s documentation page.
  2. Create a local working directory:
mkdir C:SetupDiag
  1. Open Command Prompt with Run as administrator.
  2. Change to the folder containing the executable.
  3. 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.
  • SafeModeHardblock and AuditModeHardblock — setup was started in an unsupported mode.
  • VHDHardblock and PortableWorkspaceHardblock — 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When there is no match or the result looks wrong

SetupDiag cannot find logs

  • The temporary $Windows.~BT directory or Windows.old was 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
%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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.