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","passwor
d",ADS_SECURE_AUTHENTICATION);
echo $oComp->Name;

The failure..

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 php5 on windows XP and 2003
Many thanks,
Simon

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to