Im using a call to a DLL that is suppose to return values of registry keys. The problem is my PHP returns NOTHING. The exact same script in asp works FINE so im trying to figure out what im doing wrong. PLEASE HELP!!
Here is the Manuals info for this statement thats having the problem.
Get
The Get method retrieves a named value from a registry key without expanding any environment variables. The Get method supports the REG_SZ, REG_EXPAND_SZ, and REG_DWORD named-value data types.
Syntax
Get(FullKeyValueName)
here is the asp code that works.
<%
' Set to a large value so that we can step through this in DevStudio.
' It's not needed if we're not interactively debugging this page.
Server.ScriptTimeout = 600 ' seconds
Set reg = Server.CreateObject("IISSample.RegistryAccess")
%>
<%
' Get various values
env = "HKEY_CURRENT_USER\Environment\"
temp = env & "TEMP"
tmp = env & "tmp"
' Get a string value
tempDir = Reg.Get(temp)
' Get and expand the same string value
tempDirExpand = Reg.GetExpand(temp)
%>
<p>
Your temporary directory is <% = tempDir %> (<% = tempDirExpand %>).<br>
Now here is the php code that I cant seem to get to work.
<?
// Set to a large value so that we can step through this in DevStudio.
// It's not needed if we're not interactively debugging this page.
set_time_limit(600);
$reg = new COM("IISSample.RegistryAccess");
?>
<?
// Get various values
$env="HKEY_CURRENT_USER\Environment\";
$temp=$env."TEMP";
$tmp=$env."tmp";
// Get a string value
$tempDir=$Reg->Get[$temp];
// Get and expand the same string value
$tempDirExpand=$Reg->GetExpand[$temp];
?>
<p>
Your temporary directory is <? echo $tempDir; ?> (<? echo $tempDirExpand; ?>).<br>