Using the COM abilities of PHP it's trivial to read registry values from your windows SERVER. This is alright for Web based activities, but often more useful when using PHP for standalone scripting.
Here's a simple example one can use to find out where the Microsoft .NET compiler executable is located on their machine.
Code:
$shell = new COM("WScript.Shell") or die("Requires Windows Scripting Host");
$devenvpath=$shell->RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\devenv.exe\\");
One thing I've overlooked a few times in the past is when cutting and pasting the value from regedit, you'll need to remember to escape the \'s by turning them into \\'s
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.