Win32 COM help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux