You are using Wiki Moniker, and as far as I can see, you cannot specify the parameters that you need through it. Instead, you need to use the SWbemLocator object, since you can pass the SWbemNamedValueSet as the final parameter.
The UProcedures.pas GLibWMI file has a ConnectWMI function. It passes zero to the final parm:
Services := Locator.ConnectServer(wmiHost, STR_CIM2_ROOT, {user}STR_EMPTY, {password}STR_EMPTY, STR_EMPTY,STR_EMPTY, 0, nil);
You need to create an alternative, something like this:
var NVS: SWbemNamedValueSet; providerArchitecture : OleVariant; requiredArchitecture : OleVariant; ///// providerArchitecture := 32; // or 64 requiredArchitecture := true; NVS := CoSWbemNamedValueSet.Create(); NVS.Add('__ProviderArchitecture', providerArchitecture , 0); NVS.Add('__RequiredArchitecture', requiredArchitecture , 0); // Create the Location object Locator := CoSWbemLocator.Create(); // Connect to the WMI service, with the root\cimv2 namespace Services := Locator.ConnectServer(wmiHost, STR_CIM2_ROOT, {user}STR_EMPTY, {password}STR_EMPTY, STR_EMPTY,STR_EMPTY, 0, NVS);
This will give you the ISWbemServices interface where you can execute ExecQuery.
Access to the registry through StdRegProv -
procedure Get_RegistryValue(aIDispatch: IDispatch); var objWMIService : OLEVariant; strKeyPath : OLEVariant; strValue : OLEVariant; strOut : OLEVariant; objStdRegProv : OLEVariant; begin; objWMIService := aIDispatch; objStdRegProv := objWMIService.Get('StdRegProv'); strKeyPath := 'Software\Microsoft\Wbem\CIMOM'; strValue := 'Logging'; objStdRegProv.GetStringValue(HKEY_LOCAL_MACHINE, strKeyPath, strValue, strOut); with Form1.lst1 do begin items.Add(strOut); end; end; end; // connect to root\default instead of cimv2 function MyConnectWMI(wmiHost:string; var Services: ISWbemServices):Boolean; const STR_DEFAULT_ROOT = 'root\default' STR_EMPTY = ''; var NVS: SWbemNamedValueSet; providerArchitecture : OleVariant; requiredArchitecture : OleVariant; Locator : ISWbemLocator; //CoSWbemLocator; begin try providerArchitecture := 32; // or 64 requiredArchitecture := true; NVS := CoSWbemNamedValueSet.Create( ); NVS.Add('__ProviderArchitecture', providerArchitecture , 0); NVS.Add('__RequiredArchitecture', requiredArchitecture , 0); // Create the Location object Locator := CoSWbemLocator.Create(); // Connect to the WMI service, with the root\cimv2 namespace Services := Locator.ConnectServer(wmiHost, STR_DEFAULT_ROOT, {user}STR_EMPTY, {password}STR_EMPTY, STR_EMPTY,STR_EMPTY, 0, NVS); Result := True; except Result := False; end; end;