Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Jan 22, 2025
1 parent 40b3564 commit 8351293
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions crates/libs/registry/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,27 @@ fn main() -> Result<()> {
Ok(())
}
```

Use the `options()` method for even more control:

```rust,no_run
use windows_registry::*;
fn main() -> Result<()> {
let tx = Transaction::new()?;
let key = CURRENT_USER
.options()
.read(true)
.write(true)
.create(true)
.transaction(&tx)
.open("software\\windows-rs")?;
key.set_u32("name", 123)?;
tx.commit()?;
Ok(())
}
```

0 comments on commit 8351293

Please sign in to comment.