2

This is a simple question: How do I access Windows' registry with PHP and the DOTNET class? What I want to do is to read a value that another program wrote.

Googling did not reveal much. I appreciate any answer!

Tower
  • 98,741
  • 129
  • 357
  • 507
  • 2
    You're going to use very different methods to access the registry in .Net vs PHP. Any reason you want to learn about both at this time? – Michael Petrotta Sep 11 '10 at 08:21

1 Answers1

1

I found the answer, it works with the COM object:

$wscript = new COM('WScript.Shell');
$a = $wscript->RegRead('HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\etc');
var_dump($a->value);
Tower
  • 98,741
  • 129
  • 357
  • 507