Wmi. When the programme is launched, there is a window of choice for msi-biblitonnes.
-
Hello, everyone!
I'm writing a first program with WMI on Delphi Embarcadero XE3. Added ISWbemLocator, asked for a server, a root COMV2, a mistake. When I try to create this object dynamically, there's a window of search for some msi-fail. How do you win?
Get the idiot in the stupid language, or I've already got the brain residue. ♪ ♪
PS: For example, I am creating a dynamic object. ♪ ♪
type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } Services: ISWbemServices; public { Public declarations } end;
var
Form1: TForm1;implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var Locator: ISWbemLocator;
begin
Locator := CoSWbemLocator.Create;
Services := Locator.ConnectServer('.', 'root\cimv2', '', '', '', '', 0, nil)
end;end.
-
Good afternoon!
Try instead. CoSWbemLocator Use SWbemLocator♪
and code generator for delphi using WMI class
https://theroadtodelphi.com/wmi-delphi-code-creator/