xdscheetos
Member
- Joined
- Nov 11, 2003
- Messages
- 6
Im trying to acces and read a registry value but on some computers the key / subkey do not exist.
SO I keep getting an error message saying:
----
An unhandled exception of type System.NullReferenceException occurred in dc.exe
Additional information: Object reference not set to an instance of an object.
----
Anyway of checking the existance of the key before hand ?
Or checking the result for validity ?
At the moment I get Nothing as a value when I step thru the code. Already tried testing for getype.tostring = "Nothing" .
VB.net and using the following fonctions:
Registry.LocalMachine.OpenSubKey("SOFTWARE\abc\def").GetValue("myvalue")
Any help is appreciated,
thanks
SO I keep getting an error message saying:
----
An unhandled exception of type System.NullReferenceException occurred in dc.exe
Additional information: Object reference not set to an instance of an object.
----
Anyway of checking the existance of the key before hand ?
Or checking the result for validity ?
At the moment I get Nothing as a value when I step thru the code. Already tried testing for getype.tostring = "Nothing" .
VB.net and using the following fonctions:
Registry.LocalMachine.OpenSubKey("SOFTWARE\abc\def").GetValue("myvalue")
Any help is appreciated,
thanks