Skip to content

Instantly share code, notes, and snippets.

@dmi3mis
Created October 24, 2017 08:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dmi3mis/975fdc9d01c4ea8e41e0e51bbad79666 to your computer and use it in GitHub Desktop.
Save dmi3mis/975fdc9d01c4ea8e41e0e51bbad79666 to your computer and use it in GitHub Desktop.
RESETTING THE REARM COUNT IN WINDOWS 7
WINDOWS 7
RESETTING THE REARM COUNT IN WINDOWS 7
9 JANUARY 2013 IT FUNK 41 COMMENTS
After installing Windows 7, and before activation, the operating system will run in an Initial Grace Period license status for 30 days. When this grace period expires, users can rearm Windows 7 for an additional 30 days, and do this up to 3 times, effectively allowing the OS to run legally for 120 days without a genuine product key.
When a user uses up all three available rearms, the only option left is to enter a genuine product key to activate Windows 7, or leave the operating system in a crippled, non-genuine state. Users will then be subjected to certain annoyances such as black desktop background, repetitive notification messages stating that this copy of Windows is illegal or counterfeited, and a reminder to register the software at login.
Through a Windows Product Activation (WPA) vulnerability that Microsoft introduced in Windows 7, it is possible to reset the remaining rearm count back to 4. There is no limit to the number of times that the rearm count can be reset, meaning that a user could theoretically run an unlicensed copy of Windows 7 forever, without the need for proper activation, and without applying any activation hacks.
This WPA vulnerability is related to a WPA registry key which contains the ‘Last Rearm Time’. When the WPA registry key is deleted, the whole licensing status of Windows 7 is re-initiated to the Initial Grace Period as if Windows 7 has just been installed. The deletion of the WPA registry key is achieved via the following command:
reg load HKLM\MY_SYSTEM “%~dp0Windows\System32\config\system”
reg delete HKLM\MY_SYSTEM\WPA /f
reg unload HKLM\MY_SYSTEM
Given the importance of this WPA registry key, Microsoft has locked it (and its sub-keys) from been modified or deleted in a normal user session. The only way to run this command is within the WinRE (Windows Recovery Environment) or WinPE (Windows Preinstallation Environment).
In our managed environment, this method of rearming Windows is ultra handy in our SOE creation, in that we do not have to keep starting from scratch when we run out of rearms. This ‘hard’ rearm reset gives us one less thing to worry about if we need to tweak anything in our images.
To perform this ‘hard’ reset; create a batch script file with the following commands:
reg load HKLM\MY_SYSTEM "%~dp0Windows\System32\config\system"
reg delete HKLM\MY_SYSTEM\WPA /f
reg unload HKLM\MY_SYSTEM
Save the file as delwpa.bat on drive C: at the root folder level. For example, C:delwpa.bat. Note that some users may require to run the text editor such as Notepad as administrator to save to C: root directory.
Restart the computer.
Press F8 right after the BIOS screen to get to the “Advanced Boot Options”.
Select Repair Your Computer.
Select your keyboard input method, and click Next.
Enter user name and password login credentials, and click OK.
In the “System Recovery Options”, open Command Prompt.
Type C: to go to the main drive, and the execute the delwpa.bat file by typing its name:delwpa.bat
Note: On some computers such as virtual machine or computer with recovery partition, the main drive may have another drive letter, e.g. D:
The console should display messages saying that the commands were executed successfully. Close the console window and reboot the machine.
After system start-up, log into Windows. Your system will display message such as “This product is not genuine”. Just ignore it.
To check the activation status, open an elevated command prompt window as administrator, and run the following command:slmgr /dlvThe dialog box with the following details should appear:
License Status: Initial Grace Period
Time remaining: 30 days
Remaining windows rearm count: 3
Tip: As an alternative, it’s possible boot from a Windows 7 Repair Disc or a Windows 7 installation disc to go to WinPE environment. This method will bypass the need to enter login credentials. Pressing F8 will bring user to WinRE console.
@V-Blocky
Copy link

One question, if I perform this action on my HP laptop Windows 7 Ultimate non genuine (cuz I made a mistake when upgrading form Professional to Ultimate) will this erase my entire files in my laptop? I wanna make sure this will not affect my important files

@dmi3mis
Copy link
Author

dmi3mis commented Nov 26, 2023

Hi!

will this erase my entire files in my laptop?
No, your files will be safe. delwpa.bat will only delete Windows Product Activation (WPA) info from registry.
This script only extend Initial Grace Period.
I wanna make sure this will not affect my important files
Use Backup Luke!

@askiiart
Copy link

@V-Blocky No, it will not delete any data. But if/when you can use your laptop properly, I'd recommend using a better method to activate it, like Microsoft-Activation-Scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment