[Bug 46894] New: SIMATIC WinCC V15.1 Runtime installer (.NET 4.0) fails in CoreLib::GetPhysicalMemoryAmountWmi() (missing 'DeviceLocator' property of 'Win32_PhysicalMemory' WMI class)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Mar 24 09:06:07 CDT 2019


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

            Bug ID: 46894
           Summary: SIMATIC WinCC V15.1 Runtime installer (.NET 4.0) fails
                    in CoreLib::GetPhysicalMemoryAmountWmi() (missing
                    'DeviceLocator' property of 'Win32_PhysicalMemory' WMI
                    class)
           Product: Wine
           Version: 4.4
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: msi
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

reported by a user in IRC #winehq.

Copy/pasta from his pastebin links.

--- snip ---
Installer error:
13.00.54|INFO1     |CoreLib::GetPhysicalMemoryAmountWmi()   |(01) Exception -
System.Management.ManagementException: Error code: 0x80041002
13.00.54|INFO1     |  ... continue line ...                 |Exception -    at
System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus
errorCode)
13.00.54|INFO1     |  ... continue line ...                 |Exception -    at
System.Management.PropertyData.RefreshPropertyInfo()
13.00.54|INFO1     |  ... continue line ...                 |Exception -    at
System.Management.PropertyDataCollection.get_Item(String propertyName)
13.00.54|INFO1     |  ... continue line ...                 |Exception -    at
System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
13.00.54|INFO1     |  ... continue line ...                 |Exception -    at
System.Management.ManagementBaseObject.get_Item(String propertyName)
13.00.54|INFO1     |  ... continue line ...                 |Exception -    at
Siemens.Automation.Setup.Core.Tools.General.GetPhysicalMemoryAmountWmi()
13.00.54|INFO2     |CoreLib::GetMemoryWMI()                 |(01)
InnerException - InnerException is NULL
13.00.54|INFO_ENV  |RAM WMI                                 |(01) 0,00B
--- snip ---

--- snip ---
...
004e:trace:wbemprox:wbem_services_ExecQuery 0x1967a8, L"WQL", L"SELECT * FROM
Win32_PhysicalMemory", 0x00000010, (nil), 0x33ebc4
004e:trace:wbemprox:grab_table returning 0x7ce7b638
004e:trace:wbemprox:parse_query wql_parse returned 0
004e:trace:wbemprox:fill_physicalmemory created 1 rows
004e:trace:wbemprox:EnumWbemClassObject_create 0x33ebc4
004e:trace:wbemprox:EnumWbemClassObject_create returning iface 0x1ac770
...
004e:trace:wbemprox:enum_class_object_Next 0x1875b0, -1, 1, 0x1a45e0, 0xeff7f4
004e:trace:wbemprox:create_class_object L"Win32_PhysicalMemory", 0x1a45e0
004e:trace:wbemprox:create_class_object returning iface 0x196718
...
004e:trace:wbemprox:class_object_Get 0x196718, L"__GENUS", 00000000, 0x33ec0c,
0x33ec90, 0x33ec8c
004e:trace:wbemprox:class_object_Get 0x196718, L"__PATH", 00000000, 0x33ebf0,
0x33ec78, 0x33ec74
...
004e:trace:wbemprox:class_object_Get 0x196718, L"DeviceLocator", 00000000,
0x33ec0c, 0xeffec0, 0xeffec4
004e:fixme:wmiutils:wmiutils_cf_QueryInterface interface
{b196b28f-bab4-101a-b69c-00aa00341d07} not implemented
004e:fixme:wmiutils:status_code_QueryInterface interface
{c3fcc19e-a970-11d2-8b5a-00a0c9b7c9c4} not implemented
004e:fixme:wmiutils:status_code_QueryInterface interface
{00000003-0000-0000-c000-000000000046} not implemented
004e:fixme:wmiutils:status_code_QueryInterface interface
{00000144-0000-0000-c000-000000000046} not implemented
004e:fixme:wmiutils:status_code_GetErrorCodeText 0x1acc90, 0x80041002, 0x0000,
0x00000001, 0x33ebdc
...
--- snip ---

I didn't bother debugging it but just decompiling the relevant function of
calling assembly 'Setup.Core.dll'.

--- snip ---
// Type: Siemens.Automation.Setup.Core.Tools.General
// Assembly: Setup.Core, Version=102.0.146.1, Culture=neutral,
PublicKeyToken=229591fa2d4059f2
// MVID: 0F0EB668-D0EE-4D52-8B03-80AFA252A799
// Assembly location: Z:\home\focht\Downloads\Setup.Core.dll
// Compiler-generated code is shown

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Management;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Threading;

namespace Siemens.Automation.Setup.Core.Tools
{
....
    public static ulong GetPhysicalMemoryAmountWmi()
    {
      ManagementScope scope = new ManagementScope("\\root\\cimv2");
      try
      {
        scope.Connect();
      }
      catch (UnauthorizedAccessException ex)
      {
        return 0;
      }
      ulong num = 0;
      try
      {
        ObjectQuery query = new ObjectQuery("SELECT * FROM
Win32_PhysicalMemory");
        foreach (ManagementObject managementObject in new
ManagementObjectSearcher(scope, query).Get())
        {
          if (string.Format("{0}", managementObject["DeviceLocator"]) !=
"SYSTEM ROM")
            num += (ulong) managementObject["Capacity"];
        }
      }
      catch (Exception ex)
      {
        MessageSender.RaiseLogMessage("CoreLib", LogMessageSeverity.Info1,
ex.ToString(), "Exception", "GetPhysicalMemoryAmountWmi()");
        for (Exception innerException = ex.InnerException; innerException !=
null; innerException = innerException.InnerException)
          MessageSender.RaiseLogMessage("CoreLib", LogMessageSeverity.Info2,
innerException.ToString(), "InnerException", "GetMemoryWMI()");
        MessageSender.RaiseLogMessage("CoreLib", LogMessageSeverity.Info2,
"InnerException is NULL", "InnerException", "GetMemoryWMI()");
      }
      return num;
    }
--- snip ---

Microsoft docs:

https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-physicalmemory

--- quote ---
DeviceLocator

    Data type: string

    Access type: Read-only

    Qualifiers: MappingStrings ("SMBIOS|Type 17|Device Locator")

    Label of the socket or circuit board that holds the memory.

    Example: "SIMM 3"

    This value comes from the Device Locator member of the Memory Device
structure in the SMBIOS information.
--- quote ---

Wine source:

https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/wbemprox/builtin.c#l1044

$ sha1sum SIMATIC_WinCC_Runtime_Advanced_V15_1.exe
db1f97bb648b62fa1c5d974d7f2bcb6b4a9fd786 
SIMATIC_WinCC_Runtime_Advanced_V15_1.exe

$ du -sh SIMATIC_WinCC_Runtime_Advanced_V15_1.exe
1.3G    SIMATIC_WinCC_Runtime_Advanced_V15_1.exe

$ wine --version
wine-4.4-188-gc988910cae

Regards

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