https://github.com/subconsciouscompute/windows-snapshot
Find out windows state asynchronously and more
https://github.com/subconsciouscompute/windows-snapshot
monitoring rust windows wmi wmic
Last synced: about 1 year ago
JSON representation
Find out windows state asynchronously and more
- Host: GitHub
- URL: https://github.com/subconsciouscompute/windows-snapshot
- Owner: SubconsciousCompute
- Created: 2023-04-04T10:52:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-26T09:54:32.000Z (about 3 years ago)
- Last Synced: 2025-04-29T18:51:30.830Z (about 1 year ago)
- Topics: monitoring, rust, windows, wmi, wmic
- Language: Rust
- Homepage:
- Size: 331 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# windows-snapshot
[](https://github.com/SubconsciousCompute/windows-snapshot/actions/workflows/rust.yml)
[](https://crates.io/crates/windows-snapshot)
[](https://docs.rs/crate/windows-snapshot/)
The aim is to provide a snapshot of Windows system asynchronously. It achieves this by using `WMI`.
Our global state is `windows_snapshot::state::Windows` which stores the states of Windows machine at any given instance.
Each state member can be updated synchronously or asynchronously, alone or alongside other states.
Example:
```rust
use windows_snapshot::COMLibrary;
#[tokio::main]
async fn main() {
let _com_con = COMLibrary::new().unwrap(); // initialise security context
let mut k = windows_snapshot::state::Windows::default();
k.async_update().await;
//k.update(); // for synchronous update
println!("{k:#?}");
}
```