How-To: Reset the windows re-arm count.

Found this when I was tasked with finding a way to resolve an issue with a golden image a customer was using for Citrix. The image they were using was updated a few times and the end result was they were unable to sysprep the image and create new Citrix XenApp servers. Microsoft stops people from doing this to foil software pirates, but really this just annoys admins. The following guide is something i am testing now to see if i can get around the issue. I will update the post once i have tested this.

1) I use VMWARE here at this client, I shut down the VM and created a copy of the vmdk by browsing the data store. Next I mounted the disk on another vm where I will modify the registry offline. Next, I used the following commands to edit the registry from a command prompt. The other drive was mounted as the e: drive. (make sure to use the right drive letter when following along below:

reg load HKLM\MY_SYSTEM e:\Windows\System32\config\system" 
reg delete HKLM\MY_SYSTEM\WPA /f
reg unload HKLM\MY_SYSTEM

I exported the hive just to be safe before starting.

The console should display messages saying that the commands were executed successfully. Close the console window and shut down the machine.

2) after reattaching the drive to the original vm, i received the following error

bootmgr missing

(Still working on this, more to come)

Ultimately i was not able to follow this process, jump to the section below for what process actually worked for me. YMMV

2) Back on Windows: login and don’t worry if the desktop shows a message like “This product is not genuine”. Just ignore it.
Run Command Prompt as administrador, and execute the following command depending on your Windows 7 version:



slmgr /ipk HYF8J-CVRMY-CM74G-RPHKF-PW487

Home Premium:

slmgr /ipk RHPQ2-RMFJH-74XYM-BH4JX-XM76F

Home Basic:



slmgr /ipk 7Q28W-FT9PC-CMMYT-WHMY2-89M6G

Then perform a final reboot on your machine.

3) After the reboot, check that everything is alright by running a command prompt as administrator and executing:

slmgr /dlv

Wait for a few seconds and you should get a window with lots of data. This is what we’re interested in:
License Status: Initial Grace Period
Time remaining: 30 days
Remaining windows rearm count: 4


ok, so here is the update, on our vmware based server that i was trying to do this, i was really having a hard time, long story short, i got as far as a BSOD but no further.


ultimately, i used this process (although i used different KMS keys)

1) Stop the Software Protection service -sppsvc:
(type services.msc in the search box and run it, look for “Software Protection” service and right click on it > Stop).

2) Move your tokens.dat to your desktop
(go to: C:\Windows\ServiceProfiles\NetworkService\AppData\ Roaming\Microsoft\SoftwareProtectionPlatform
right click on tokens.dat click CUT and past it to your desktop)
*you may need to take ownership of the file if you can’t move it to your desktop 

3) Go to C:\Windows\System32
LOOK for 2 hidden files with this extention “.C7483456-A289-439d-8115-601632D005A0”
move these two files to your desktop.
*you may need to take ownership of the files if you can’t move them to your desktop 
*if you can’t find the files, make sure on “folder options” that you can see hidden and system files.

4) Start the Software Protection service -sppsvc:
(type services.msc in the search box and run it, look for “Software Protection” service and right click on it > Start).

5) Open command prompt as admin and run “slmgr /dlv”

6) Stop the Software Protection service again.

7) Put the files on your desktop back to their place and and replace them.
tokens.dat to:
C:\Windows\ServiceProfiles\NetworkService\AppData\ Roaming\Microsoft\SoftwareProtectionPlatform
and the 2 files to:

Start the Software Protection service again.

8) Install your default product key.
open command prompt as admin and run “slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX”
change “XXXXX-XXXXX-XXXXX-XXXXX-XXXXX” to your edition default key:
Professional – HYF8J-CVRMY-CM74G-RPHKF-PW487 
Home Premium – RHPQ2-RMFJH-74XYM-BH4JX-XM76F 
Starter – 7Q28W-FT9PC-CMMYT-WHMY2-89M6G 

9) Reboot your computer.

I was able to create a non sysprep’d golden master that i have cloned using vmware. I followed the old citrix process for cloning to prepare the system for cloning. I was able to create two new servers by cloning and running sysprep. so far so good, the servers are taking users and no errors in the event log. hopefully it stays stable while i create a new Citrix image, i really didnt want to go this route and would have preferred to use PVS to solve this issue instead, unfortunately, time and budget constraints forced me down this path.


hope you never have to play with this…. =)