Created
September 3, 2023 08:01
-
-
Save TomerCohen95/63c0860c320b14f1472cc4c5c46ce47c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn get_registry_value(key_path: &str) -> Result<String, io::Error> { | |
| let hklm = RegKey::predef(HKEY_LOCAL_MACHINE); | |
| let key = hklm.open_subkey(key_path)?; | |
| let value: String = key.get_value("my_key")?; | |
| Ok(value) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment