13 releases (8 stable)

new 1.3.0 Oct 25, 2024
1.2.3 Mar 24, 2023
1.2.2 May 16, 2022
1.2.1 Oct 26, 2021
0.0.2 Nov 21, 2014

#23 in Windows APIs

Download history 835/week @ 2024-07-08 770/week @ 2024-07-15 1331/week @ 2024-07-22 1133/week @ 2024-07-29 1144/week @ 2024-08-05 1266/week @ 2024-08-12 1483/week @ 2024-08-19 1329/week @ 2024-08-26 1428/week @ 2024-09-02 1086/week @ 2024-09-09 1078/week @ 2024-09-16 1021/week @ 2024-09-23 889/week @ 2024-09-30 935/week @ 2024-10-07 1131/week @ 2024-10-14 1499/week @ 2024-10-21

4,517 downloads per month
Used in 17 crates (12 directly)

MIT/Apache

45KB
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!(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.

Dependencies

~128MB
~2M SLoC