I am trying to use windows com objects to interact with the windows registry,
here is my code:
<?php
$hostname = ".";
$keyPath = "\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
$wshShell = new
COM("winmgmts:{impersonationLevel=impersonate}//{$hostname}/root/default:StdRegProv");
$wshShell->EnumKey("HKEY_LOCAL_MACHINE", $keyPath, $keys);
foreach($keys as $key){
print $key;
}
unset($wshShell);
?>
When I try to run this script, I get an error that PHP (5.04) has crashed. Am I
doing something wrong or does PHP not support what I am trying to do?
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php