Peter,

>     Every time I run this code I get an Unhindered Exception Error (the
>exact type is: System.NullReferenceException).  After doing some digging I
>found out that for some weird reason after the call to OpenSubKey() myKey is
>still null.  Why is that ?  What am I doing wrong ?

I don't think the leading backslash should be there, try removing it

RegistryKey myKey = rootKey.OpenSubKey("Software\\MyApp", true);


Mattias

===
Mattias Sjögren
[EMAIL PROTECTED]

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to