RegistryProxy.CurrentConfig Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a RegistryKey type which provides access to HKEY_CURRENT_CONFIG.

Namespace:   Microsoft.VisualBasic.MyServices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public RegistryKey CurrentConfig { get; }

HKEY_CURRENT_CONFIG is primarily used to store settings for devices on the computer.

The RegistryPermission class, which is in the System.Security.Permissions namespace, controls access to registry variables. Registry variables should not be stored in memory locations where code without RegistryPermission can access them. Similarly, when granting permissions, grant only those privileges necessary to get the job done.

Registry permission access values are defined by the RegistryPermissionAccess enumeration. The following table details its members.

Value

Description

AllAccess

Create, read, and write access to registry variables.

Create

Create access to registry variables.

NoAccess

No access to registry variables.

Read

Read access to registry variables.

Write

Write access to registry variables.

The following table lists examples of tasks involving the My.Computer.Registry object.

To

See

Create a registry key and set its value

How to: Create a Registry Key and Set Its Value in Visual Basic

Delete a registry key

How to: Delete a Registry Key in Visual Basic

Read a value from a registry key

How to: Read a Value from a Registry Key in Visual Basic

This example creates the subkey MyDeviceSettings.

My.Computer.Registry.CurrentConfig.CreateSubKey("MyDeviceSettings")

.NET Framework
Available since 2.0
Return to top
Show: