Hi All,
I have the following bit of code which works fine in a browser window, but as soon as I try it in cli mode it fails. I have a lot of other COM stuff which works just fine, just this one. Any ideas welcome.
$oDso = new COM("WinNT:");
$oComp = $oDso->OpenDSObject("WinNT://DOMAIN/HOST$,user","administrator","password",ADS_SECURE_AUTHENTICATION);
echo $oComp->Name;
The failure (only in cli mode)..
PHP Fatal error: Uncaught exception 'com_exception' with message 'Source: Unknown Description: Unknown' in c:\apache\corizon\inventory\batch.php:46
Stack trace:
#0 c:\apache\corizon\inventory\batch.php(46):com->OpenDSObject('WinNT://DOMAIN/...', 'administrator', 'password', 1)
#1 {main}
Using latest php5 on windows XP and 2003
Many thanks,
Simon