Exemplo n.º 1
0
 /**
  * build the global Error object and create the WMI connection
  */
 public function __construct()
 {
     parent::__construct();
     // don't set this params for local connection, it will not work
     $strHostname = '';
     $strUser = '';
     $strPassword = '';
     // initialize the wmi object
     $objLocator = new COM('WbemScripting.SWbemLocator');
     if ($strHostname == "") {
         $this->_wmi = $objLocator->ConnectServer();
     } else {
         $this->_wmi = $objLocator->ConnectServer($strHostname, 'rootcimv2', $strHostname . '\\' . $strUser, $strPassword);
     }
     $this->_getCodeSet();
 }
 /**
  * build the global Error object and create the WMI connection
  */
 public function __construct()
 {
     parent::__construct();
     // don't set this params for local connection, it will not work
     $strHostname = '';
     $strUser = '';
     $strPassword = '';
     try {
         // initialize the wmi object
         $objLocator = new COM('WbemScripting.SWbemLocator');
         if ($strHostname == "") {
             $this->_wmi = $objLocator->ConnectServer();
         } else {
             $this->_wmi = $objLocator->ConnectServer($strHostname, 'rootcimv2', $strHostname . '\\' . $strUser, $strPassword);
         }
     } catch (Exception $e) {
         $this->error->addError("WMI connect error", "PhpSysInfo can not connect to the WMI interface for security reasons.\nCheck an authentication mechanism for the directory where phpSysInfo is installed.");
     }
     $this->_getCodeSet();
 }
Exemplo n.º 3
0
 /**
  * call parent constructor
  */
 public function __construct()
 {
     parent::__construct();
 }
Exemplo n.º 4
0
 /**
  * call parent constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->error->addError("WARN", "The Minix version of phpSysInfo is work in progress, some things currently don't work");
 }