TRegistry: Odd behavior from CGI Executable (Help!)
Hi!
I have used TRegistry before. But I am now attempting to read a String
from the registry with a stand-along CGI executable and it just isn't
working. Are there special considerations to be taken into account
here?
My code:
Registry := TRegistry.Create;
Registry.RootKey := Hkey_Local_Machine;
Registry.OpenKey('\Software\sPC\sShop',false);
Mailer.RemoteHost := Registry.ReadString('SMTP');
Registry.CloseKey;
Registry.Free;
This code works beautifully in an application. But my cgi says it
doesn't exist. If I change the OpenKey to ('...\sShop2',True) it
creates the key right along side the one I am trying to read.
As I said, this exact code performs as expected from an application.
So my code is right as far as that is concerned. I suspect there might
be an issue with the inherent nature of a cgi application but I need
someone to confirm or deny this. Any light shed would be appreciated.
Deadra
Sent via Deja.com http://www.deja.com/
Before you buy.