Tuesday, July 5, 2011

PHP WMI Example using Instances

You can download the scripting program for generating these scripts at:

http://www.planetmps.com/wmiscriptsinstances.html

com_load_typelib("Microsoft WMI Scripting V1.2 Library");
$locator = new COM("WbemScripting.SWbemLocator");
$svc = $locator->ConnectServer();
$ob = $svc->Get("Win32_Process");
$objs = $ob->Instances_;
foreach($objs as $obj)
{
   foreach($prop as $obj->Properties_)
   {
   }
 last;
}

No comments:

Post a Comment