Registry class interface
Provides access to the Windows Registry as a database.
Use this object to work with Registry keys and values, such as opening keys, viewing subkeys, creating new keys, and managing key values.
You can either open a specific key within the Registry or use one of the predefined root keys (e.g., localMachine, currentUser, or classesRoot).
Example of opening a key:
const keyPath = r'Software\Microsoft\Windows NT\CurrentVersion';
final key = Registry.openPath(RegistryHive.localMachine, path: keyPath);
Once you have a key, you can manipulate it by performing various operations, including creating, updating, renaming, or deleting values stored under that key.
Note: Always ensure that you properly close keys when you are finished with them to release system resources using the RegistryKey.close method.
For additional information on working with keys and values, see the documentation for the RegistryKey class.
Constructors
- Registry()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- allUsers → RegistryKey
-
Gets the
HKEY_USERS
Registry key with read-only access.no setter - classesRoot → RegistryKey
-
Gets the
HKEY_CLASSES_ROOT
Registry key with read-only access.no setter - currentConfig → RegistryKey
-
Gets the
HKEY_CURRENT_CONFIG
Registry key with read-only access.no setter - currentUser → RegistryKey
-
Gets the
HKEY_CURRENT_USER
Registry key with read-only access.no setter - localMachine → RegistryKey
-
Gets the
HKEY_LOCAL_MACHINE
Registry key with read-only access.no setter - performanceData → RegistryKey
-
Gets the
HKEY_PERFORMANCE_DATA
Registry key with read-only access.no setter
Static Methods
-
openPath(
RegistryHive hive, {String path = '', AccessRights desiredAccessRights = AccessRights.readOnly}) → RegistryKey - Opens a Registry key based on the given path and Registry hive.