[Bug 50805] New: Win32_OperatingSystem class is missing 'ProductType'

WineHQ Bugzilla wine-bugs at winehq.org
Sun Mar 14 14:47:30 CDT 2021


https://bugs.winehq.org/show_bug.cgi?id=50805

            Bug ID: 50805
           Summary: Win32_OperatingSystem class is missing 'ProductType'
           Product: Wine
           Version: 6.2
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: P2
         Component: wmi&wbemprox
          Assignee: wine-bugs at winehq.org
          Reporter: xerox.xerox2000x at gmail.com
      Distribution: ---

Created attachment 69616
  --> https://bugs.winehq.org/attachment.cgi?id=69616
patch for producttype

Various installers in chocolatey like OBS Studio first try to install several
windows updates (KB*). They do not even get to the point where install is tried
to start because they fail with

ERROR: Property 'ProductType' cannot be found on this object. Make sure that
itexists.
The install of kb3118401 was NOT successful.
Error while running
'C:\ProgramData\chocolatey\lib\KB3118401\Tools\ChocolateyIntall.ps1'.
 See log for details.

Chocolatey seems to use own powershell host (+scripts);

From
ProgramData/chocolatey/extensions/chocolatey-windowsupdate/Install-WindowsUpdate.ps1
:

        function Get-OS
        {
            $wmiOS = Get-WmiObject -Class Win32_OperatingSystem
            $version = [Version]$wmiOS.Version
            $caption = $wmiOS.Caption.Trim()
            $sp = $wmiOS.ServicePackMajorVersion
            if ($sp -gt 0) {
                $caption += " Service Pack $sp"
            }

            if ($wmiOS.ProductType -eq '1') {
                $productType = 'client'
            } else {
                $productType = 'server'
            }
            .
            .

The attached patch fixes the bug. I don`t know the difference between 'server'
and 'client', from testbots only w2008s64 returns client (3) so in the patch I
just set Productype to 1. 

With this patch at least one update succeeded to install normally and the
others can be "fooled" with a dummy "wusa.exe", so chocolatey believes they
installed and doesn`t try to install them endlessly over and over again.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list