According to the Windows 10 lifecycle, users must install large update packages (feature updates) more often than in previous Windows versions. Windows 10 is upgraded twice a year. Currently, the latest Windows 10 version is Windows 10 1809 (October 2018 Update). Windows 10 version upgrade may be compared with the installation of Service Pack in earlier Windows versions. The members of the Windows 10 Insider Preview program install such builds more often – the system build is updated 3-4 times a month.
Windows 10 upgrade doesn’t always performed successfully. On different reasons, the installation of a new build may fail. However, it is not always possible to understand why the update couldn’t be installed (Windows doesn’t display the meaningful information). Nevertheless, all necessary information about the build upgrade process is stored in the log files. This info may be useful when diagnosing and fixing Windows 10 upgrade errors. These logs are plain text files, and in order to find meaningful info in them, you must be a true Windows expert.
Microsoft’s SetupDiag.exe Tool
Fortunately, Microsoft has recently released a new diagnostic tool, SetupDiag.exe, which allows you to get a detailed information about the reasons why Windows 10 build was not upgraded on your computer. It is a command line tool and it must be started directly on Windows 10 computer, that was not upgraded, or on the offline mode on another computer, to which you must copy the log files from the problem computer in advance.
SetupDiag scans Windows install logs and looks for specific errors in them that indicate a particular Windows upgrade issue.
SetupDiag.exe works in Windows 10, and requires .NET Framework 4.6 or higher to be installed on your computer (Checking .NET Framework version installed on your computer). You can use the tool both to diagnose the upgrade errors of Windows 10 builds and when upgrading from Windows 7 SP1 or Windows 8.1 to Windows 10. (You will have to copy the upgrade log files to a computer running Windows 10 to analyze them.)
Download the SetupDiag tool following this link https://go.microsoft.com/fwlink/?linkid=870142 and run it in the elevated cmd. When run without any parameters, the tool tries to find log files that Windows 10 creates during the upgrade.
The SetupDiag search follows the standard paths that are created by the system at different stages of new Windows 10 build installation. By default, log files are located in the following folders:
\$Windows.~bt\Sources\Rollback– upgrade files appear in this directory if Windows 10 upgrade finished with an error and you had to roll back to the previous build;
When the logs have been analyzed, the tool creates results.log file in the directory it is run from. The file contains the list of errors that occurred during the upgrade (you may specify the location of the resulting file using the /Output parameter). The utility also creates a ZIP-archive with the source log files.
You can run the SetupDiag tool in the offline mode and scan log files copied from another computer. For example, to search the log files offline in a certain folder and save the result to the specified file, run this command:
SetupDiag.exe /Output:C:\SetupDiag\Results.log /Mode:Offline /LogsPath:D:\Logs
SetupDiag may be used to analyze memory dump files (minidump) created in Windows 10 when a BSOD appears (WinDbg must be installed). The setupmem.dmp is created in
%WinDir%\Panther\NewOS\Rollback depending on the stage the upgrade of Windows 10 build has been interrupted.
To analyze the setupmem.dmp in the specified directory, run this command:
SetupDiag.exe /Output:C:\SetupDiag\Dumpdebug.log /Mode:Offline /LogsPath:D:\Dump
When starting SetupDiag, you’ll see the following messages in the console:
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 is using a number of predefined patterns (rules) used to find known Windows 10 upgrade issues. I. e. SetupDiag will help you to find only those upgrade errors that are determined in these patterns. No match string means that the specified problem is not found in the logs.
The set of SetupDiag rules is extending. For example, there were 26 rules in SetupDiag v1.00 (03/30/2018), and there are 53 templates in the SetupDiag v126.96.36.199 (12/18/2018). Each rule has a name and unique identifier. Let’s consider SetupDiag rules and the related errors of Windows 10 upgrade in brief.
- CompatScanOnly — FFDAFD37-DB75-498A-A893-472D49A1311D – setup.exe installation has been called in compatibility mode, not in an upgrade mode.
- BitLockerHardblock — C30152E2-938E-44B8-915B-D1181BA635AE – the source system has BitLocker enabled that is not supported in the target one.
- VHDHardblock — D9ED1B82-4ED8-4DFD-8EC0-BE69048978CC – the system is booted as a VHD image (this upgrade mode is not supported in Windows 10).
- PortableWorkspaceHardblock — 5B0D3AB4-212A-4CE4-BDB9-37CA404BB280 – the system is booted from a USB Windows To-Go device (the upgrade in the Windows To-Go environment is not supported).
- AuditModeHardblock — A03BD71B-487B-4ACA-83A0-735B0F3F1A90 – the OS is booted into the Audit Mode.
- SafeModeHardblock — 404D9523-B7A8-4203-90AF-5FBB05B6579B — the OS is booted into the Safe Mode.
- InsufficientSystemPartitionDiskSpaceHardblock — 3789FBF8-E177-437D-B1E3-D38B4C4269D1 – the system partition doesn’t have enough space for the upgrade.
- CompatBlockedApplicationAutoUninstall – BEBA5BC6-6150-413E-8ACE-5E1EC8D34DD5 – an incompatible app found that has to be removed prior to the build upgrade.
- CompatBlockedApplicationDismissable — EA52620B-E6A0-4BBC-882E-0686605736D9 – during installation in a quiet (with the /quiet key) mode, an error occurred that requires interaction with a user and blocks the installation.
- CompatBlockedApplicationManualUninstall — 9E912E5F-25A5-4FC0-BEC1-CA0EA5432FF4 – a non-standard application without an Add/Remove Programs entry is found in the system. Its files must be removed manually.
- HardblockDeviceOrDriver — ED3AEFA1-F3E2-4F33-8A21-184ADF215B1B – one of the installed drivers is not compatible with the new OS and must be removed.
- HardblockMismatchedLanguage — 60BA8449-CF23-4D92-A108-D6FCEFB95B45 – the language of the source and the target systems don’t match.
- HardblockFlightSigning — 598F2802-3E7F-4697-BD18-7A6371C8B2F8 – you are trying to install a pre-release (as a part of Windows Insider program) on a computer with the Secure Boot mode enabled. The pre-release won’t boot in this mode.
- DiskSpaceBlockInDownLevel — 6080AFAC-892E-4903-94EA-7A17E69E549E – the system ran out of disk space when upgrading.
- DiskSpaceFailure — 981DCBA5-B8D0-4BA7-A8AB-4030F7A10191 – the system ran out of disk space after rebooting into the new release.
- DeviceInstallHang — 37BB1C3A-4D79-40E8-A556-FDA126D40BC6 – the system hung or failed (BSOD appeared) during the upgrade installation.
- DebugSetupMemoryDump — C7C63D8A-C5F6-4255-8031-74597773C3C6 – BSOD appeared during the installation. The memory dump must be analyzed for further debug.
- DebugSetupCrash — CEEBA202-6F04-4BC3-84B8-7B99AED924B1 – a setup error that requires memory dump debug.
- DebugMemoryDump — 505ED489-329A-43F5-B467-FCAAF6A1264C – it is a rule to debug a memory.dmp file created during setup/upgrade.
- BootFailureDetected — 4FB446C2-D4EC-40B4-97E2-67EB19D1CFB7 – a boot failure occurred on the specific stage of the upgrade.
- FindDebugInfoFromRollbackLog — 9600EB68-1120-4A87-9FE9-3A4A70ACFC37 – provides information about BSOD with no need to install the debug package.
- AdvancedInstallerFailed — 77D36C96-32BE-42A2-BB9C-AAFFE64FCADC — a fatal installer error.
- FindMigApplyUnitFailure — A4232E11-4043-4A37-9BF4-5901C46FD781 – an error in the migration unit.
- FindMigGatherUnitFailure — D04C064B-CD77-4E64-96D6-D26F30B4EE29 – a detailed information about the failed migration unit.
- CriticalSafeOSDUFailure — 73566DF2-CA26-4073-B34C-C9BC70DBF043 – a failure to update the SafeOS image.
- UserProfileCreationFailureDuringOnlineApply — 678117CE-F6A9-40C5-BC9F-A22575C78B14 – an error when creating or editing a user profile during online phase of the upgrade.
- WimMountFailure — BE6DF2F1-19A6-48C6-AEF8-D3B0CE3D4549 – failed to mount the WIM file during the upgrade.
- FindSuccessfulUpgrade — 8A0824C8-A56D-4C55-95A0-22751AB62F3E – Windows 10 build has been upgraded successfully.
- FindSetupHostReportedFailure — 6253C04F-2E4E-4F7A-B88E-95A69702F7EC – a failure on the early stages of upgrade in thr setuphost.exe.
- FindDownlevelFailure — 716334B7-F46A-4BAA-94F2-3E31BC9EFA55 – an error in the SetupPlatform.
- FindAbruptDownlevelFailure — 55882B1A-DA3E-408A-9076-23B22A0472BD – the information about the latest failure, when the log entries end unexpectedly.
- FindSetupPlatformFailedOperationInfo — 307A0133-F06B-4B75-AEA8-116C3B53C2D1 – the information about the phase and error if SetupPlatform critical failure occurs.
- FindRollbackFailure — 3A43C9B5-05B3-4F7C-A955-88F991BB5A48 – the latest action and the problem phase before rollback to the previous Windows 10 version.
- AdvancedInstallerGenericFailure – 4019550D-4CAA-45B0-A222-349C48E86F71 – read/write errors of AdvancedInstaller.
- OptionalComponentFailedToGetOCsFromPackage – D012E2A2-99D8-4A8C-BBB2-088B92083D78 – the information about an error in an optional component when trying to get the list of the package components.
- OptionalComponentOpenPackageFailed – 22952520-EC89-4FBD-94E0-B67DF88347F6 – a failure when trying to open an optional component.
- OptionalComponentInitCBSSessionFailed – 63340812-9252-45F3-A0F2-B2A4CA5E9317 – the installer or the specific component are not running.
- UserProfileCreationFailureDuringFinalize – C6677BA6-2E53-4A88-B528-336D15ED1A64 – an error of creating a user profile on the final stage of the upgrade.
- WimApplyExtractFailure – 746879E9-C9C5-488C-8D4B-0C811FF3A9A8 – a failure of the WIM image when it is unpacked.
- UpdateAgentExpanderFailure – 66E496B3-7D19-47FA-B19B-4040B9FD17E2 — a DPX failure when updating using Windows Update.
- FindFatalPluginFailure – E48E3F1C-26F6-4AFB-859B-BF637DA49636 – an error in one of the plugins.
- AdvancedInstallerFailed – 77D36C96-32BE-42A2-BB9C-AAFFE64FCADC – Indicates critical failure in the AdvancedInstaller while running an installer package
- MigrationAbortedDueToPluginFailure – D07A24F6-5B25-474E-B516-A730085940C9 – critical failure in a migration plugin that causes setup to abort the migration.
- DISMAddPackageFailed – 6196FF5B-E69E-4117-9EC6-9C1EAB20A3B9 – critical failure during a DISM add package operation.
- PlugInComplianceBlock – D912150B-1302-4860-91B5-527907D08960 – detects all compat blocks from Server compliance plug-ins.
- AdvancedInstallerGenericFailure – 4019550D-4CAA-45B0-A222-349C48E86F71 – Triggers on advanced installer failures in a generic sense.
- FindMigGatherApplyFailure – A9964E6C-A2A8-45FF-B6B5-25E0BD71428E- shows errors when the migration Engine fails out on a gather or apply operation.
- OptionalComponentFailedToGetOCsFromPackage – D012E2A2-99D8-4A8C-BBB2-088B92083D78 – indicates the optional component migration operation failed to enumerate optional components from an optional component package.
- OptionalComponentOpenPackageFailed – 22952520-EC89-4FBD-94E0-B67DF88347F6 – indicates the optional component migration operation failed to open an optional component package.
- OptionalComponentInitCBSSessionFailed – 63340812-9252-45F3-A0F2-B2A4CA5E9317 – indicates corruption in the servicing stack on the down-level system.
- DISMproviderFailure – D76EF86F-B3F8-433F-9EBF-B4411F8141F4 – triggers when a DISM provider (plug-in) fails in a critical operation.
- SysPrepLaunchModuleFailure – 7905655C-F295-45F7-8873-81D6F9149BFD – indicates a sysPrep plug-in has failed in a critical operation
- UserProvidedDriverInjectionFailure – 2247C48A-7EE3-4037-AFAB-95B92DE1D980 – a driver provided to setup (via command line input) has failed in some way.
Here is an example of the results.log file providing the information about the OS, the source and the target Windows 10 versions and the error FindFatalPluginFailure:
Matching Profile found: FindFatalPluginFailure - E48E3F1C-26F6-4AFB-859B-BF637DA49636
Machine Name = Offline
Manufacturer = VMware, Inc.
Model = VMware Virtual Platform
HostOSArchitecture = x64
FirmwareType = PCAT
BiosReleaseDate = 20160921000000.000000+000
BiosVendor = PhoenixBIOS 4.0 Release 6.0
BiosVersion = 6.00
HostOSVersion = 10.0.16299
HostOSBuildString = 16299.15.amd64fre.rs3_release.170928-1534
TargetOSBuildString = 10.0.17134.1 (rs4_release.180410-1804)
HostOSLanguageId = 1049
HostOSEdition = Professional
UpgradeStartTime = 4/10/2019 9:17:59 PM
UpgradeEndTime = 4/10/2019 10:10:36 PM
UpgradeElapsedTime = 00:52:37
ReportId = 004db4ee-17f9-4b6f-bc46-a8bd9877ccd8
Error: SetupDiag reports fatal migration plug-in failure. Plug-in Name = %windir%\system32\migration\CntrtextMig.dll, Migration Operation = IPostApply->ApplySuccess, Plug-in Error: 0x00000032
In this example SetupDiag has found that the upgrade installation failed due to an error in the %windir%\system32\migration\CntrtextMig.dll plugin.
If the system was upgraded successfully, results.log contains the following message:
Matching Profile found: FindSuccessfulUpgrade - 8A0824C8-A56D-4C55-95A0-22751AB62F3E
SetupDiag Error: Main() failed with an unhandled exception
In some cases when you run SetupDiag, you may encounter an error: “ SetupDiag: Main() failed with an unhandled exception” in the log
10:20:58 - SetupDiag: Main() failed with an unhandled exception:
Could not find a part of the path 'C:\$Windows.~bt\sources\rollback'.
Exception System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\$Windows.~bt\sources\rollback'.
Stack: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption searchOption)
at Microsoft.Internal.Deployment.SetupDiag.CSetupAPIParser.GetCorrectSetupApiLog(String logsPath, DateTime dtSetupActLogTime)
at Microsoft.Internal.Deployment.SetupDiag.CSetupDiag.RunDiag(String strRulesFile, String strlogsPath, String strMode, String strOutPut, String strFormat, String resLevel, Boolean fCreateLogs)
at Microsoft.Internal.Deployment.SetupDiag.Program.Main(String args)
In my case, this was due to the fact that one of the log folders was missing. I solved this problem by copying the remaining logs to a certain folder and running SetupDiag in the offline mode:
SetupDiag.exe /Output:C:\tools\Results.log /Mode:Offline /LogsPath:c:\Logs\
Some of the errors are easy to fix (like the insufficient free space on the system volume), the other are more difficult. Anyway, SetupDiag allows you to faster diagnose and fix the upgrade problems on the computers running Windows 10 and save the trouble of an administrator to analyze logs manually.