Muokkaa

Jaa


RegistryProxy.Users Property

Definition

Returns a RegistryKey type, which provides access to HKEY_USERS.

public:
 property Microsoft::Win32::RegistryKey ^ Users { Microsoft::Win32::RegistryKey ^ get(); };
public Microsoft.Win32.RegistryKey Users { get; }
member this.Users : Microsoft.Win32.RegistryKey
Public ReadOnly Property Users As RegistryKey

Property Value

RegistryKey

Examples

This example counts and displays the number of values in the registry key.

Dim keyCount = My.Computer.Registry.Users.ValueCount
MsgBox(keyCount)

Remarks

HKEY_USERS is primarily used to store default settings for first-time users.

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 the fewest privileges necessary to get the job done.

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

Value Access to Registry Variables
AllAccess Create, read, and write
Create Create
NoAccess No access.
Read Read
Write Write

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
Delete a registry key How to: Delete a Registry Key
Read a value from a registry key How to: Read a Value from a Registry Key

Applies to

See also