I am attempting to script the install of the WindowsUpdateDiagnostic.diagcab
sourced here.
msdt.exe /cab "%~dp0WindowsUpdateDiagnostic.diagcab" -af "%~dp0stillneeded.xml"
Unfortunately, attempts at creating a answer file seems to have failed:
Not finding much on 0x80092003. I am hoping with an example answers.xml, I could spoof the answers and make it work.
Here is a template, but I havn't had any luck.
<Answers>
<Interaction ID="IT_Theme">
<Value>Nature</Value>
</Interaction>
</Answers>
Sourced: https://msdn.microsoft.com/en-us/library/dd776530.aspx#CommandLineAdministration
Thanks in advance.
Best Answer
You can use the Get-TroubleshootingPack (https://msdn.microsoft.com/en-us/library/dd323716(v=vs.85).aspx) cmdlet in PowerShell to create an answer file:
(Note that it uses the path to the existing troubleshooter in %systemroot% (usually C:\Windows), not the .diagcab file. I have not been able to create an answer file using the .diagcab file).
This should just ask you one question, and you type "1 [Enter]" to answer "Apply Fix." Then you can create a PowerShell script (.ps1) with just this line in it:
And you can run that PowerShell script with a command like this:
...which should create 3 or more files in C:\WUDResult (change the paths as you want).