Vista Protected Mode - Read registry ODBC c#

Add-in Express™ Support Service
That's what is more important than anything else

Vista Protected Mode - Read registry ODBC c#
Cannnot open registry ODBC hive in Vista Protected mode c# 
richard david briggs briggs




Posts: 1
Joined: 2009-11-04
I have to allow user to choose from ODBC datasources for my toolbar application.

This works fine generally, but when in Vista Protected mode, the following Second line of code returns null:-

RegistryKey reg = (Registry.CurrentUser).OpenSubKey("Software")  // this is ok;
reg = reg.OpenSubKey("ODBC");// this returns null


Can you help explain why?

Should I be using a different method of reading the registry in proteced mode?
Posted 04 Nov, 2009 06:24:36 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hello Richard,

I would recommend you reading open the key in the one line of code instead. Please let me know whether it helps.
.NET, Extended MAPI, Windows Phone & RT
Posted 04 Nov, 2009 07:30:00 Top