Thanks to Hans' comment above, I was able to solve the problem using ILocalRegistry4.GetLocalRegistryRootEx
, passing in the __VsLocalRegistryType.RegType_Configuration
enum.
// previous code deleted
EDIT: Upon further investigation, there seems to be a much better way - a class that already does this, accepting __VsLocalRegistryType
as parameter: VSRegistry
, also conveniently returning RegistryKey
:
public RegistryKey ConfigRoot
{
get { return VSRegistry.RegistryRoot(__VsLocalRegistryType.RegType_Configuration); }
}