3

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:

enter image description here

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.

  • 0x80092003 = CRYPT_E_FILE_ERROR (An error occurred while reading or writing to a file.) – magicandre1981 Jan 31 '15 at 7:12
3

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:

Get-TroubleshootingPack C:\Windows\Diagnostics\system\WindowsUpdate -AnswerFile c:\WUDAnswers.xml

(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:

Get-TroubleshootingPack -Path C:\Windows\diagnostics\system\WindowsUpdate | Invoke-TroubleshootingPack -AnswerFile c:\WUDAnswers.xml -Unattended -Result c:\WUDResult

And you can run that PowerShell script with a command like this:

powershell -ExecutionPolicy Bypass -file c:\RunWindowsUpdateDiagnostics.ps1

...which should create 3 or more files in C:\WUDResult (change the paths as you want).

3

The suggested solution is theoretically correct but won't work with WindowsUpdateDiagnostic.diagcab because this one includes two WTP Packages in a single diagcab cabinet file.

  1. Therefore please expand the diagcab file using expand.exe, 7Zip or the like to c:\wud\
  2. Then run Powershell with elevated privileges (right click/run as administator)
  3. type "Import-Module TroubleshootingPack"
  4. then continue using the previously stated solution i.e. run "Get-TroubleshootingPack C:\wud\BitsDiagnostic -AnswerFile c:\wud\answer_bits.xml"
  5. and "Get-TroubleshootingPack C:\wud\windowsupdatediagnostic -AnswerFile c:\wud\answer_wud.xml"

Now you have two answer files and a corresponding directory c:\wud which can be deployed and invoked using

Get-TroubleshootingPack -Path C:\wud\windowsupdatediagnostic | Invoke-TroubleshootingPack -AnswerFile c:\wud\answer_wud.xml -Unattended -Result c:\wud\log_wud

and

Get-TroubleshootingPack -Path C:\wud\BitsDiagnostic | Invoke-TroubleshootingPack -AnswerFile c:\wud\answer_bits.xml -Unattended -Result c:\wud\log_bits

I don't know if one can make it using the "multi-diagcab" with two answer files and msdt.exe... Presumably not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.