Crate registry

source ·
Expand description

Registry

A convenient crate for safely accessing and mutating the Windows Registry.

Usage

In general, you will want to access a key from a Hive. This crate automatically handles the conversion of String and str into a UTF-16 string suitable for FFI usage.

let regkey = Hive::CurrentUser.open(r"some\nested\path", Security::Read)?;

A RegKey has all necessary functionality for querying subkeys, values within a key, and accessing key value data.

regkey.set_value("SomeValue", &Data::U32(42))?;
assert!(matches!(regkey.value("SomeValue")?, Data::U32(42)));

RegKeys also support iteration of all subkeys with the keys() function, and all values with the values() function.

Modules

Structs

  • The safe representation of a Windows registry key.
  • A safe representation of ACL bitflags.

Enums

  • A type-safe wrapper around Windows Registry value data.
  • A higher level convenience error type for functions that do multiple registry-related operations and don’t want to invent their own error type.
  • All hives of the Windows Registry. Start here to get to a registry key.