Windows7 system activation file backup (a)

  
        

The current Windows 7 is not activated, and the 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 line to Notepad and save as "Backup Activation File.bat".

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

@echo off< Br>

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 "%WinD Ir%\\System32\\spp\\tokens\\pkeyconfig\\pkeyconfig.bak"

ne


t 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 underline to Notepad, using the secret used to activate the system Replace the XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with the key and save it as "Resume activation file .bat".

Two "batch" files use 1, the above two batch files are placed in 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 activate 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