A simple Rust program that retrieves the Windows product key from your system, displays it in a GUI, and allows you to save it to a CSV file.
- Go to the "Releases" tab in the GitHub repository.
- Download the binary
extract-windows-key.exe
file attached to the latest release. - Run the downloaded executable file. The Windows key will be displayed in the GUI.
- Click the "Save" button to save the Windows key and your computer's name to a CSV file named
windows_keys.txt
. - Click the "Close" button to close the program.
- Clone the repository to your local machine using
git clone https://github.com/hansaskov/extract-windows-key
. - Navigate to the cloned repository's directory using
cd extract-windows-key
. - Compile and run the program with
cargo run
. - The Windows key will be displayed in the GUI.
- Click the "Save" button to save the Windows key and your computer's name to a CSV file named
windows_keys.txt
. - Click the "Close" button to close the program.
The program includes the following main functions:
main
: Initializes the GUI and sets up the event handler for button clicks.get_computer_name
: Retrieves the computer's name.get_windows_key
: Retrieves the Windows product key using a PowerShell command.save_windows_key_to_csv
: Saves the Windows key and computer name to a CSV file.
This project is released under the MIT License.