On my devolopment machine the following code works fine however when I create a setup file and deploy this app to another computer It throws an error.
I was wondering if someone could tell me why the error "91 Object reference not set to an instance of an object" is thrown from the following code and how I might be able to work around this issue.
Dim strDatabaseLocation as string
'get database location
Dim dbLocation As Microsoft.Win32.RegistryKey
dbLocation = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Bussiness\\Product", False)
strDatabaseLocation = dbLocation.GetValue("Database location")
Any help would really be appreaciated!