How to read registry

R

Rinaldo

I trying to read the registry where my programm is installed.
if (result == DialogResult.OK)
{
string Prog = LeesPadVanRegister();
Process.Start(Prog + ".exe");

protected string LeesPadVanRegister ()
{
string Reg = (string)
Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Lampie
Soft\\Software\\Radio Speler","Directory",1);

return Reg;
}

But reg stays null and the path is correct.

What is wrong.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top