VSRegistry.RegistryRoot Method (IServiceProvider, __VsLocalRegistryType, Boolean)

Represents the root of the registry hive under which Visual Studio is currently running, in the specified part of the registry.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)


Public Shared Function RegistryRoot ( _
    provider As IServiceProvider, _
    registryType As __VsLocalRegistryType, _
    writable As Boolean _
) As RegistryKey
public static RegistryKey RegistryRoot(
    IServiceProvider provider,
    __VsLocalRegistryType registryType,
    bool writable
static RegistryKey^ RegistryRoot(
    IServiceProvider^ provider, 
    __VsLocalRegistryType registryType, 
    bool writable
static member RegistryRoot : 
        provider:IServiceProvider * 
        registryType:__VsLocalRegistryType * 
        writable:bool -> RegistryKey 
public static function RegistryRoot(
    provider : IServiceProvider, 
    registryType : __VsLocalRegistryType, 
    writable : boolean
) : RegistryKey


Return Value

Type: Microsoft.Win32.RegistryKey


For the registryType parameter you should use only RegType_Configuration for the application root, or [f:Microsoft.VisualStudio.Shell.Interop.__VsLocalRegistryType.RegType_UserSettings] for the user settings root.

.NET Framework Security

See Also


VSRegistry Class

RegistryRoot Overload

Microsoft.VisualStudio.Shell Namespace