Principle of WinRAR key generation
WinRAR is a trialware file archiver utility for Windows, developed by Eugene Roshal of win.rar GmbH.
It can create and view archives in RAR or ZIP file formats and unpack numerous archive file formats.
WinRAR is not a free software. If you want to use it, you should pay to RARLAB and then you will get a license file named rarreg.key
.
This repository will tell you how WinRAR license file "rarreg.key"
is generated.
See here.
Github Action is a CI/CD tool introduced after Microsoft acquired Github, and you can run programs on GitHub Action by following these steps.
Fork this repo.
If you've forked before and I've committed new code, but you don't know how to merge the new content into your repository, then you can delete the current fork and fork again.
Go to keygen/info.json
and click on the edit button to edit the file.
You can see:
{
"text1": "Github",
"text2": "Github.com"
}
You can modify the values corresponding to text1
and text2
:
{
"text1": "yourname",
"text2": "yourteam"
}
It is important to note that test1
and test2
are ANSI-encoded string, without space character.
Once you have finished making changes, click the Commit changes button and Github Actions will start automatically.
If Github Actions does not start automatically, you will need to click on the Actions page to allow this workflows to run, then modify and commit keygen/info.json
again.
Go to the Actions page to see the status of the program.
Green means it ran successfully, yellow means it is running, red means it failed. After running successfully, open the corresponding task and select rarreg_file to download.
After extract rarreg_file.zip
, you will get rarreg.key
, just drag and drop it into WinRAR.
If you get an invalid key, please check the specific solution.
I recommend using the Github Actions, but you can still do your own compilation.
If you don't want to compile it yourself, you can also go to the release page to get winrar-keygen.exe
.
-
Please make sure that you have Visual Studio 2022. Because this is a VS2022 project. If you are still using Visual Studio 2019, you can find projects for VS2019 in the vs2019 branch, but this branch will no longer be maintained.
-
Please make sure you have installed
vcpkg
and the following libraries:mpir:x86-windows-static
mpir:x64-windows-static
is installed.
You can install them by:
$ vcpkg install mpir:x86-windows-static $ vcpkg install mpir:x64-windows-static
-
Your
vcpkg
has been integrated into your Visual Studio, which means you have run successfully.$ vcpkg integrate install
-
Open this project in Visual Studio.
-
Select
Release
configuration. -
Select Build > Build Solution.
You will see executable files in bin/
directory.
Execute the following code in the terminal and configure two parameters to generate rarreg.key
.
Here is an example use Github
and Github.com
:
Usage:
winrar-keygen.exe <your name> <license type>
Example:
winrar-keygen.exe "Github" "Github.com"
or:
winrar-keygen.exe "Github" "Github.com" > rarreg.key
or:
winrar-keygen.exe "Github" "Github.com" > rarreg.key | out-file -encoding ascii rarreg.key
Now you can see the newly generated file:
RAR registration data
Github
Github.com
UID=3a3d02329a32b63da7d8
6412212250a7d8753c5e7037d83011171578c57042fa30c506caae
9954e4853d415ec594e46076cc9a65338309b66c50453ba72158c0
656de97acb2f2a48cf3b75329283544c3e1b366a5062b85d0022f6
de3cdc56b311475b484e80b48157a0c3af60ca4f7f9c75d49bc50d
6bad616c1c58caa922d3ed0cd19771e8191522a586544c3e1b366a
5062b85d29db066f02e777ad78100865f2c31f2dd3a86998609b18
5eede7ed46566b10bf033daa6384062b259194b1acbd1443042646
Save the generated information in ANSI encoding format as rarreg.key
.
Why is my rarreg.key
invalid?
test1
and test2
are ANSI-encoded string, without space character Issues #5.
winrar-keygen.exe <text1> <text2>
You can refer to: Generation of "rarreg.key"
If you use the following command:
winrar-keygen.exe "Github" "Github.com" > rarreg.key
In the newer Windows 10, PowerShell will export in UTF16-LE format by default, which will cause the error.
Please use the following command:
winrar-keygen.exe "Github" "Github.com" > rarreg.key | out-file -encoding ascii rarreg.key
If you are unable to drag, you can try to put the rarreg.key
in the following directory.
C:\Users\yourname\AppData\Roaming\WinRAR\rarreg.key
If you encounter some problems, you can report on the Issues page. There will be many enthusiastic developers or Github users to help you.
This project welcomes contributions and suggestions. You can make suggestions in Issues, or submit a pull request 😄
Thank you very much to some enthusiastic developers for helping answer some questions in Issues.
🏆 Special Thanks @Sonic-The-Hedgehog-LNK1123
The code is available under the MIT license