SetupDiag is a command line tool created by Microsoft for troubleshooting Windows 10 Upgrade issues. The lack of a UI makes it difficult for the average person to use. I built a basic UI to run SetupDiag.exe in online mode directly on a computer that has failed its upgrade. I make this available through Software Center and use the "Repair" button to allow running on demend.
For the UI, I decided to employ something I'd been meaning to start working with since the last MMS and the presentation on WPF forms in PowerShell.
When run, it displays the output of the SetupDiag.exe registry key data, located here in an easier to digest form: HKEY_LOCAL_MACHINE\SYSTEM\Setup\MoSetup\Volatile\SetupDiag
And to run it from Software Center, it will look like this:
Details on the application's deployment type are the following:
- Installation Program: Powershell.exe -ExecutionPolicy Bypass -Command .\Invoke-SetupDaigUI.ps1
- Uninstall program: blank
- Repair Program: Powershell.exe -ExecutionPolicy Bypass -Command .\Invoke-SetupDaigUI.ps1
- Installation and Repair programs are the same.
- Detection Method:
- Detection Rule: Can be anything simple that is always detected. I did a registry detection for HKLM:\System\Setup
- User Experience:
- Install for system, Only when a user is logged on, Hidden.
- ☑ Allow users to view and interact with the program installation. (Checked)
- Max Runtime to 30 minutes.
And don't forget a pretty picture for Software Center.
The source files for this tool are located out here on github: https://github.com/paulwetter/WettersSource/tree/master/SetupDiagGUI