是否有针对后Delphi 2007的WmiSet的替换或更新?

Pie*_*Wyk 4 delphi wmi wmi-query

我们目前使用WmiSet网上联系到远程机器上运行的WMI查询和查询注册表设置.

问题是它只支持Delphi直到RAD Studio 2007.

我们目前正在升级到Delphi XE,需要知道是否有人知道 - 或者有 - 更新版本的WmiSet组件或类似的东西.

我们已尝试与供应商联系,但到目前为止,我们的任何查询都没有任何回复.

RRU*_*RUZ 7

Pieter,不久前我启动了一个名为Delphi Wmi Class Generatorthis project的项目,创建了完整的文档Object Pascal类(与delphi 7兼容到XE)来访问WMI.

检查此代码,该代码使用TWin32_BIOS类(由应用程序创建)来访问Win32_BIOS远程计算机中的 wmi类.

uses
  SysUtils,
  uWmiDelphiClass in '..\..\uWmiDelphiClass.pas',
  uWin32_BIOS in '..\..\root_CIMV2\uWin32_BIOS.pas';

var
  RemoteBiosInfo : TWin32_BIOS;
  i              : integer;
begin
   try
     RemoteBiosInfo:=TWin32_BIOS.Create(False);
     try

       RemoteBiosInfo.WmiServer:='192.168.217.128';
       RemoteBiosInfo.WmiUser  :='Administrator';
       RemoteBiosInfo.WmiPass  :='password'; 
       RemoteBiosInfo.LoadWmiData;

       if RemoteBiosInfo.WmiConnected then  
       begin
         Writeln('Serial Number       '+RemoteBiosInfo.SerialNumber);
         Writeln('BuildNumber         '+RemoteBiosInfo.BuildNumber);
         if RemoteBiosInfo.BIOSVersion.Count>0 then
         Writeln('Version             '+RemoteBiosInfo.BIOSVersion[0]);
         Writeln('Identification Code '+RemoteBiosInfo.IdentificationCode);
         Writeln('Manufacturer        '+RemoteBiosInfo.Manufacturer);
         Writeln('SoftwareElementID   '+RemoteBiosInfo.SoftwareElementID);
         Writeln('Release Date        '+DateToStr(RemoteBiosInfo.ReleaseDate));
         Writeln('Install Date        '+DateToStr(RemoteBiosInfo.InstallDate));
         Writeln('Target S.O          '+GetTargetOperatingSystemAsString(RemoteBiosInfo.TargetOperatingSystem));
         Writeln('Soft. element state '+GetSoftwareElementStateAsString(RemoteBiosInfo.SoftwareElementState));

         Writeln('');
         Writeln('Bios Characteristics');
         Writeln('--------------------'); 
         for i:=Low(RemoteBiosInfo.BiosCharacteristics)  to High(RemoteBiosInfo.BiosCharacteristics) do
          Writeln(GetBiosCharacteristicsAsString(RemoteBiosInfo.BiosCharacteristics[i]));
       end
       else
       Writeln('No connected');
     finally
      RemoteBiosInfo.Free;
     end;
   except
    on E:Exception do
     Writeln(E.Classname, ': ', E.Message);
   end;

 Readln;
end.
Run Code Online (Sandbox Code Playgroud)