PDA

Click to See Complete Forum and Search --> : read registry


andy345
Jul 18th, 2005, 02:18 PM
Is it possible to read from the registry with PHP?

john tindell
Jul 18th, 2005, 04:55 PM
Set WshShell = Wscript.CreateObject("Wscript.Shell")
strIconSetting = WshShell.RegRead("HKCU\Control Panel\Desktop\IconSpacing")
WScript.Echo strIconSetting

Reads the registry from a VB script

So...

$value = new COM("Wscript.Shell");
$value = $WshShell->RegRead("HKCU\key\value");
print $value;


Should work.

visualAd
Jul 19th, 2005, 05:12 PM
Remember that the above code will read the registry on the server and not the client. ;)

andy345
Jul 20th, 2005, 05:29 PM
Is it possible to read the registry from the client?

john tindell
Jul 20th, 2005, 06:01 PM
The only way to read the registry from the client machine is to have a client install on the clients computer which communicates with the server. As far as i know there is a "hack" that can read the registry from an ActiveX control but they wont work with Fx or Opera.
What information do you want to read? Could you use cookies instead?