Backup Win 7 activation file, automatically activate Win7

  
after reinstalling the system

Now Windows 7 is not activated, Windows 7 desktop will be dark. The user who activated Windows 7 re-installed the system and forgot the activation code. It is difficult to find a valid activation code to activate Windows 7. Below, the author teaches us how to backup the activation file of Windows 7, reinstall the system, let Windows 7 is automatically activated.

Two "Batch" file creation
1, backup activation file "Batch"
--------------------- -------------------------------------------------- ----

@echo off

copy %windir%\\System32\\spp\\tokens\\pkeyconfig\\pkeyconfig.xrm-ms

copy %windir%\\ServiceProfiles\\ NetworkService\\AppData\\Roaming\\Microsoft\\SoftwareProtectionPlatform\\tokens.dat

pause

exit

----------------- -------------------------------------------------- --------

Copy/paste the characters in the upper part of the line to Notepad and save it as “Backup Activation File.bat”.

2, restore the activation file "batch"
-------------------------------- -------------------------------------------

@ Echo off

net stop sppsvc /y

takeown /f "%WinDir%\\System32\\spp\\tokens\\pkeyconfig\\pkeyconfig.xrm-ms"

cacls "% WinDir%\\ServiceProfiles\\NetworkService\\AppData\\Roaming\\Microsoft\\SoftwareProtectionPlatform\\tokens.dat" /e /g everyone:f

cacls "%WinDir%\\System32\\spp\\tokens\\pkeyconfig\\pkeyconfig.xrm- Ms" /e /g everyone:f

ren "%WinDir%\\ServiceProfiles\\NetworkService\\AppData\\Roaming\\Microsoft\\SoftwareProtectionPlatform\\tokens.dat" "tokens.bak"

ren " %WinDir%\\System32\\spp\\tokens\\pkeyconfig\\pkeyconfig.xrm-ms" "pkeyconfig.bak"

copy tokens.dat "%WinDir%\\ServiceProfiles\\NetworkService\\AppData\\Roaming\\Microsoft\\SoftwareProtectionPlatform\\ "

copy pkeyconfig.xrm-ms "%WinDir%\\System32\\spp\\tokens\\pkeyconfig\\"

del "%WinDir%\\ServiceProfiles\\NetworkService\\AppData\\Roaming\\Microsoft\\SoftwareProtectionPlatform \\tokens.bak"

del "% WinDir%\\System32\\spp\\tokens\\pkeyconfig\\pkeyconfig.bak"

net start sppsvc

cscript %windir%\\system32\\slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX- XXXXX

cscript %windir%\\system32\\slmgr.vbs -ato

pause

exit

----------- -------------------------------------------------- --------------

Copy/paste the characters in the upper line to Notepad and replace XXXXX-XXXXX with the key used to activate the system. -XXXXX-XXXXX-XXXXX, save as "Restore activation file .bat".

Two "batch" files use
1, put the above two batch files into the same folder on any disk. Run the "Backup Activation File .bat" as an administrator to get a backup of the two activation files.

2. After reinstalling the operating system, in the case of network disconnection (note: do not connect), run the “Restore Activation File.bat” as an administrator to implement the activation of the operating system.

After the above steps, Windows 7 activation file backup, after reinstalling Windows 7, you only need these two batches to successfully activate Windows 7.

Copyright © Windows knowledge All Rights Reserved