UpdateOS icon indicating copy to clipboard operation
UpdateOS copied to clipboard

Introduce a check to ensure the EulaAccepted property exists before calling AcceptEula()?

Open NightSwimming opened this issue 1 year ago • 0 comments

Example Logfile output is:

Transcript started, output file is C:\ProgramData\Microsoft\UpdateOS\UpdateOS.log 2024/10/16 09:23:17 AM Opting into Microsoft Update 2024/10/16 09:23:18 AM Getting IsInstalled=0 and Type='Software' updates. Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)) At C:\Windows\IMECache\a7e638e5-4524-4f0d-9c80-c26aada0a8c8_1\UpdateOS.ps1:115 char:37

  •         if (!$_.EulaAccepted) { $_.AcceptEula() }
    
  •                                 ~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (:) [], COMException
    • FullyQualifiedErrorId : System.Runtime.InteropServices.COMException Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)) At C:\Windows\IMECache\a7e638e5-4524-4f0d-9c80-c26aada0a8c8_1\UpdateOS.ps1:115 char:37
  •         if (!$_.EulaAccepted) { $_.AcceptEula() }
    
  •                                 ~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (:) [], COMException
    • FullyQualifiedErrorId : System.Runtime.InteropServices.COMException

NightSwimming avatar Oct 17 '24 07:10 NightSwimming