Resetting the rearm count in Windows 7

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:

  1. 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.

  2. Restart the computer.
  3. Press F8 right after the BIOS screen to get to the “Advanced Boot Options”.
  4. Select Repair Your Computer.
  5. Select your keyboard input method, and click Next.
  6. Enter user name and password login credentials, and click OK.
  7. In the “System Recovery Options”, open Command Prompt.
  8. 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:

  9. The console should display messages saying that the commands were executed successfully. Close the console window and reboot the machine.
  10. After system start-up, log into Windows. Your system will display message such as “This product is not genuine”. Just ignore it.
  11. 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.

44 thoughts on “Resetting the rearm count in Windows 7”

  1. Hmm, doesn’t work with x86 Windows 7 Enterprise, SP1. I get “ERROR: The System was unable to find the specified registry key or value” after the first command. Perhaps MS have patched this?

    1. Yeah that first line is incorrect. It should read: reg load HKLM/MY_SYSTEM “%~dp0Windows\System32\config\system”

  2. when I type the delwpa.bat in command prompt it says that the command is not recognized. I did everything as you just told, but in the very end the file doesn’t run. I tried also typing in “run delwpa.bat”, but still not work. Can anybody help me…

    1. @Numo: You need to make sure that when you copy and paste the first line in the delwpa file that the speech marks ” come across correctly. i.e. replace them using your keyboard, as sometimes when copying and pasting the speech marks appear as the slightly curled marks, instead of straight speech marks which messes up the running of the command.

    2. it could be because windows build in recovery loads off of system reserved disk type
      wmic logicaldisk get name

      after that it will list different disk type each disk then type in delwpa.bat
      it should run on one of them disks

  3. Excellent tip. I also create images for mass deployment that I need to tweak occasionally and I cannot have the image contaminated with a product key.

  4. The script didn’t work but it deleting the entry manually from did.

    boot winpe

    run regedit


    File, load hive

    open file: c:WindowsSystem32configsystem (where c = your HDD)

    it will ask you for a name, this is just a temporary reference to the hive, type in whatever (eg SYSTEM-LOCAL)


    delete WPA


    When I did this, the windows activation status was “not available” until I registered my key using the slmgr /ipk command, then it changed to ‘3 days to activate’ and slmgr /dlv showed a rearm count of 5

  5. It worked for me thank you.

    Although i had to replace the “%~dp0Windows with “d:windows, running under F8 repair my computer.

    so under that PE environment takes the c: drive and it becomes the d: drive instead

  6. I did the following to reset the re-arming process:
    1- Run regedit , it will open the Registry Editor
    2- On the left of registry editor, expand the following to reach your required file HKEY_LOCAL_MACHINE > SOFTWARE > MICROSOFT > WINDOWS NT > CURRENT VERSION > SOFTWARE PROTECTION PLATFORM.
    3- Click on SOFTWARE PROTECTION PLATFORM and on the right of registry editor u will see the file ” SkipRearm”. Right-click on SkipRearm, then modify the skiprearm value from 0 to 1.
    4- Now run command prompt as administrator and type slmgr -rearm.
    …..your job done…

    1. I did the above but after reboot and seeing WGA notification again, I went back to regedit and looked at the file and it had reset to 0. Any suggestions why it would reset itself instead of staying at value of 1?

    2. dear Malik,
      this method only works 3 times thats exactly why we came here. Most people that come here probably already have it rearmed 3 times, after that :one will need to follow the instuctions given by the original poster.
      Indeed does this work :cmd(admin) slmgr -rearm
      but only 3 times (90days), after that youre done for and need to do it the hard way.

      1. but with this method you can put the rearm count back and do the slmgr-rearm again (3times).. but then youll have to do this hard stuff again to get the rearm count back and so on.. so you actually can have genuine status forever but will have to do the rearms every month and this ”time consuming” rearm count reset, every 3 months.

  7. Did not work for me. Script runs fine from a Windows PE environment, but upon rebooting into Windows it now just asks for a product key. SLMGR -REARM does not fix it either, still keeps asking for a key and says this copy is not genuine.

  8. Hey so I ran this script and it said everything completed successfully, then I restart in windows and run slmgr -rearm and it, too, completes successfully, but then when I restart it hasn’t reactivated windows? Help? I don’t understand…

  9. I did everything according to the tutorial and it seemed to have worked smoothly. however, my windows still runs in the crippled, non-genuine state and “slmgr /dlv” returns “error: product key not found”. what did i do wrong and is there anything i can do now to reenter grace period?

  10. I’ve just noticed that all the backslashes disappeared from my post so if you copied and pasted the code lately it wouldn’t have worked. Check again now if you’re having problems.

  11. hey it funk i followed all the steps and its still not wokring for me if you could help me out be great

    i have this in me text document

    reg load HKLM\MY_SYSTEM “%~dp0Windows\System32\config\system”
    reg delete HKLM\MY_SYSTEM\WPA /f
    reg unload HKLM\MY_SYSTEM

  12. i do all the steps but when i typed slmgr /dlv window with product key not found appear so , do i lost step or have error now what can i do ???

  13. Same here, I get errors in the Windows PE [Windows recovery command window] prompt saying something about it not being able to do it. Think it’s because it doesn’t have permissions, the only problem there … about that is, how does one do that from this window, take permissions.

  14. For those with the “product key not found” error, you need to reinstall the product key. If you have the CD great, if not you will need to use a key finder. I downloaded the free version from magical and ran it to get the Windows info. Then run an administrator mode CMD, and enter the command slmgr /ipk followed by the CD serial number. It takes a little while and will then give you a pop up confirming all your software details.

  15. Nice stuff I have found here, But I saw that Changing product keys are not so difficult. After some days ago, I need to install latest Operating system windows 8.1 pro at my notebook, So I install it with my DVD suit, But for getting its activation, I saw my product key was lost.
    I searched at yours as well as many other sites to buy a new one, but its all were free & blocked from Microsoft. Then One of my close friend told me about ODosta Store. From Where I bought a cheap one, Which is working well now. Cheer Guys!

  16. Thx IT Funk…it worked great for me…just another last step to be added to complete the rearm is to input the CD key via slmgr.vbs -ipk command.

  17. Even possible with Linux with chntpw (e.g.
    1) mount Windows, e.g. ntfs-3g /dev/sda2 /mnt/windows
    2) go to registry folder: cd /mnt/windows/Windows/System32/config
    3) save SYSTEM hive: cp SYSTEM SYSTEM.orig
    4) edit registry: chntpw -e SYSTEM
    rdel WPA
    5) reboot
    6) after reboot use slmgr.vbs /IPK your-windows-key
    7) reboot again, activate (e.g. slmgr.vbs /ato or show, e.g. slmgr.vbs /dlv)

  18. The last time i had a friend helped me with a permanent genuine windows, only if i don’t install certain updates from windows. It used a program downloaded from a link on the web.Then everything worked out great & there hadn’t been any problem ever since. But then one day, i accidentally installed an update & it ruined everything. Now the screen goes back black with a windows not genuine message popping up every time i log into my computer. And for some reason i never noted the method. Did anyone ever passed by this kind of method before? I’ve not been in contact with him for quite a time, so i can’t ask anything from him. I have also used up all my three rearms & now I don’t really know what to do with my computer. If any of you ever came by anything similar. Please let me know.


  19. i changed the first line from “MY_SYSTEM” to “SYSTEM” because that’s what i have

    the next part says ERROR:access denied

    so i am stuck here

    1. Spor:
      I was stuck same way as you. The solution was to download a .iso file,
      burn it and start the pc from that CD. Google and check for chntpw.
      Not so complicated to achieve. The rearm counter can be fixed that way.

Leave a Reply to patrick Cancel reply