7 releases (2 stable)

1.1.0 Oct 25, 2020
1.0.0 Oct 15, 2020
1.0.0-alpha.5 Sep 2, 2020
1.0.0-alpha.4 Aug 19, 2020
0.0.2 Nov 21, 2014

#25 in Windows APIs

Download history 23/week @ 2020-08-05 30/week @ 2020-08-12 40/week @ 2020-08-19 15/week @ 2020-08-26 60/week @ 2020-09-02 10/week @ 2020-09-09 10/week @ 2020-09-16 14/week @ 2020-09-23 17/week @ 2020-09-30 13/week @ 2020-10-07 66/week @ 2020-10-14 47/week @ 2020-10-21 24/week @ 2020-10-28 28/week @ 2020-11-04 15/week @ 2020-11-11 14/week @ 2020-11-18

104 downloads per month
Used in 2 crates

MIT/Apache

40KB
1K SLoC

Registry

Documentation Actions Status

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

This crate only supported versions of Windows 8.1 and newer. Usage on Windows 7 or 8 may work, subject to various Win32 API limitations. These limitations will not be documented in this crate, so if you are unfamiliar with the Win32 variants of these functions, stick to Windows 8.1 or newer.

License

The registry crate is licensed under either of

at your option.


lib.rs:

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_eq!(regkey.value("SomeValue")?, Data::U32(42));

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

Dependencies

~0.6–1.1MB
~25K SLoC