Delphi 2007 之后的 WmiSet 是否有替代或更新?

发布于 2024-10-20 06:03:17 字数 332 浏览 0 评论 0原文

我们目前使用 Online AdminWmiSet a> 在远程计算机上运行 Wmi 查询并查询注册表设置。

问题是它仅支持 Delphi 直至 RAD Studio 2007。

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

我们已尝试联系供应商,但到目前为止,我们的任何疑问都没有得到任何回复。

We currently use WmiSet from Online Admin to run Wmi Queries and query registry settings on remote machines.

The problem is that it only supports Delphi up to RAD Studio 2007.

We are currently in the process of upgrading to Delphi XE and need to know if anybody knows of — or has — a more recent version of the WmiSet components or anything similar.

We have tried to contact the vendor but so far there have not been any replies on any of our queries.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅紫色的梦幻 2024-10-27 06:03:17

Pieter,前段时间我启动了一个名为 Delphi Wmi Class Generator< 的项目/code>该项目创建完整记录的 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.

Pieter, some time ago i start a project called Delphi Wmi Class Generator this project creates full documented Object Pascal classes (compatible with delphi 7 to XE) to access the WMI.

check this code which uses the TWin32_BIOS class (created by the application) to access the
Win32_BIOS wmi class in a remote machine.

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.
风吹过旳痕迹 2024-10-27 06:03:17

将 WMISet 库转换为 Unicode Delphi 并不是太困难。我已经完成了到 Delphi 2009 和 2010 的转换,编译器会向您指出那些需要更改的代码行。如果我有时间,我会为 UniCode Delphi 准备原始代码和更改后的代码之间的“差异”并上传。

问候,
奥拉夫

converting the WMISet library to Unicode Delphi is not too difficult. I've done the conversion to Delphi 2009 and 2010, and the compiler points you towards those lines of code that need changing. If I find the time I'll prepare a "diff" between the original code and the changed one for UniCode Delphi and upload it.

Regards,
Olaf

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文