| Crates.io | win_machine_guid |
| lib.rs | win_machine_guid |
| version | 0.1.1 |
| created_at | 2026-01-16 16:17:05.233866+00 |
| updated_at | 2026-01-16 16:28:57.587359+00 |
| description | A simple library to read and reset the Windows MachineGuid registry key. |
| homepage | |
| repository | https://github.com/dietcokezerosugar/win_machine_guid_lib |
| max_upload_size | |
| id | 2048859 |
| size | 15,373 |
A lightweight, safe Rust library to programmatically read, write, and reset the Windows MachineGuid registry key.
This is the core engine behind the popular Windows Machine GUID Resetter tool. Now available as a standalone library for your own privacy tools, system administration scripts, or configuration utilities.
Add this to your Cargo.toml:
[dependencies]
win_machine_guid = "0.1.0"
View on Crates.io: https://crates.io/crates/win_machine_guid
use win_machine_guid;
fn main() {
match win_machine_guid::get_current_guid() {
Ok(guid) => println!("Current Machine GUID: {}", guid),
Err(e) => eprintln!("Error reading GUID: {}", e),
}
}
⚠️ Admin Privileges Required: This function will fail if run without Administrator rights.
fn reset_identity() {
match win_machine_guid::reset_guid() {
Ok(new_guid) => println!("Success! New GUID is: {}", new_guid),
Err(e) => eprintln!("Failed: {}", e),
}
}
fn set_custom() {
let my_guid = "00000000-0000-0000-0000-000000000000";
if let Err(e) = win_machine_guid::set_guid(my_guid) {
eprintln!("Could not set custom GUID: {}", e);
}
}
thiserror to distinguish between Registry errors and Permission errors.winreg and uuid.Found a bug? Want to add async support? Fork the repo and submit a PR!
MIT License.