Updates available

Forums Desktop Info Updates available

Viewing 6 reply threads
  • Author
    Posts
    • #2798 Reply
      AvatarEagle
      Participant

      Hi,
      I’m sorry to report a bug…

      win32_quickfixengineering showing all Updates, installed an available…

      @ powershell
      Get-WmiObject -class Win32_QuickFixEngineering

      shows:

      PS C:\Users\eagle.OEKOM-KLU-WIN7> Get-WmiObject -class Win32_QuickFixEngineering

      Source Description HotFixID InstalledBy InstalledOn
      —— ———– ——– ———– ———–
      OEKOM-KLU-… Update KB4534132 NT-AUTORITÄT\SYSTEM 13.02.2020 00:00:00
      OEKOM-KLU-… Security Update KB4516115 NT-AUTORITÄT\SYSTEM 12.12.2019 00:00:00
      OEKOM-KLU-… Update KB4517245 NT-AUTORITÄT\SYSTEM 12.12.2019 00:00:00
      OEKOM-KLU-… Security Update KB4524244 NT-AUTORITÄT\SYSTEM 13.02.2020 00:00:00
      OEKOM-KLU-… Security Update KB4524569 NT-AUTORITÄT\SYSTEM 12.12.2019 00:00:00
      OEKOM-KLU-… Security Update KB4528759 NT-AUTORITÄT\SYSTEM 15.01.2020 00:00:00
      OEKOM-KLU-… Security Update KB4537759 NT-AUTORITÄT\SYSTEM 13.02.2020 00:00:00
      OEKOM-KLU-… Security Update KB4538674 NT-AUTORITÄT\SYSTEM 12.02.2020 00:00:00
      OEKOM-KLU-… Security Update KB4541338 NT-AUTORITÄT\SYSTEM 11.03.2020 00:00:00
      OEKOM-KLU-… Update KB4551762 NT-AUTORITÄT\SYSTEM 15.03.2020 00:00:00

      So you have to check external, if they are installed….

      Regards
      Chris

      0
    • #2801 Reply
      GlennGlenn
      Keymaster

      So what is the bug?

      0
    • #2804 Reply
      AvatarEagle
      Participant

      Config file says:
      WMI=interval:60,text:Updates,namespace:root\cimv2,query:win32_quickfixengineering,maxrows:1,display:%rowcount% updates available

      but the WMI shows all updates… not just available updates

      0
    • #2806 Reply
      GlennGlenn
      Keymaster

      It seems this wmi class is not what we thought it was. I’ll remove it from the config file. Thanks for the heads up.

      0
    • #2807 Reply
      AvatarEagle
      Participant

      Maybe you’re able to implement this….

      $u = New-Object -ComObject Microsoft.Update.Session
      $u.ClientApplicationID = ‘MSDN Sample Script’
      $s = $u.CreateUpdateSearcher()
      #$r = $s.Search(“IsInstalled=0 and Type=’Software’ and IsHidden=0”)
      $r = $s.Search(‘IsInstalled=0’)
      $r.updates|select -ExpandProperty Title | Measure-Object -line | select -ExpandProperty Lines

      This shows all available updates

      0
    • #2827 Reply
      GlennGlenn
      Keymaster

      Here’s a variation on that with more info:

      $msUpdateSession = [activator]::CreateInstance([type]::GetTypeFromProgID("Microsoft.Update.Session",$env:COMPUTERNAME))
      $UpdateSearcher = $msUpdateSession.CreateUpdateSearcher()
      $SearchResultAssigned = $UpdateSearcher.Search("IsAssigned=1")
      $SearchResultHidden = $UpdateSearcher.Search("IsHidden=1")
      $SearchResultNotInstalled = $UpdateSearcher.Search("IsInstalled=0")
      $SearchResultReboot = $UpdateSearcher.Search("RebootRequired=1")
      $totalUpdatesAssigned = $($SearchResultAssigned.Updates.count)
      $totalUpdatesHidden = $($SearchResultHidden.Updates.count)
      $totalUpdatesNotInstalled = $($SearchResultNotInstalled.Updates.count)
      $totalUpdatesReboot = $($SearchResultReboot.Updates.count)
      Write-Host "Assigned: $totalUpdatesAssigned"
      Write-Host "Hidden: $totalUpdatesHidden"
      Write-Host "Not Installed: $totalUpdatesNotInstalled"
      Write-Host "Reboot Required: $totalUpdatesReboot"
      1+
    • #2843 Reply
      AvatarEagle
      Participant

      Hi,

      If you use
      $msUpdateSession = [activator]::CreateInstance([type]::GetTypeFromProgID(“Microsoft.Update.Session”,$env:COMPUTERNAME))
      DesktopInfo must “run as – administrator”

      If you change it to
      $msUpdateSession = New-Object -ComObject Microsoft.Update.Session
      DesktopInfo could be run as User

      Kind Regards
      Chris

      1+
      • #2845 Reply
        GlennGlenn
        Keymaster

        Nice. I’ll update the script for the next release.

        1+
Viewing 6 reply threads
Reply To: Updates available
Your information:




Do NOT follow this link or you will be banned from the site!