# Windows Registry Reader [](https://crates.io/crates/frnsc-liveregistry-rs) [](https://docs.rs/frnsc-liveregistry-rs) [](https://github.com/ForensicRS/frnsc-liveregistry-rs/blob/main/LICENSE) [](https://github.com/ForensicRS/frnsc-liveregistry-rs/workflows/Rust/badge.svg?branch=main) Implements [*RegistryReader*](https://github.com/ForensicRS/forensic-rs/blob/main/src/traits/registry.rs#L200) using the Windows API to access the registry of a live system. ### Usage ```rust fn test_reg(reg : &mut Box<dyn RegistryReader>) { let keys = reg.enumerate_keys(HkeyCurrentUser).unwrap(); assert!(keys.contains("SOFTWARE")); assert!(keys.contains("Microsoft")); } let registry = Box::new(LiveRegistryReader::new()); let key = registry.open_key(HkeyCurrentUser, "Volatile Environment").unwrap(); let value : String = registry.read_value(key, "USERNAME").unwrap().try_into().unwrap(); assert!(value.len() > 1); let values : Vec<String> = registry.enumerate_values(key).unwrap(); test_reg(&mut registry); ```