首先,是微软的两个激活有关的文件:
1.pkeyconfig.xrm-ms
2.tokens.dat
就是上面两个,你的激活信息就是储存在那里!
本来你可以在windows7中搜索这两个文件,然后,自己备份就行了,等到重装时还原了。
可是,这样难免太麻烦了~~~
其实,简单的两个批处理文件就能解决;
1.
@echo off
copy %windir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms
copy %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatfo
pause
exit
上面的一段代码就是备份上面两个文件的。恢复的是下面的语句;
2.
@echo off
net stop sppsvc /y
takeown /f "%WinDir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms"
cacls "%WinDir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatfo
cacls "%WinDir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms" /e /g everyone:f
ren "%WinDir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatfo
ren "%WinDir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms" "pkeyconfig.bak"
copy tokens.dat "%WinDir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatfo
copy pkeyconfig.xrm-ms "%WinDir%\System32\spp\tokens\pkeyconfig\"
del "%WinDir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatfo
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
你需要将上面代码里的XXXXX-XXXXX-XXXXX-XXXXX-XXXXX换成你的mak密钥
以上两个批处理文件就是备份还原的全部代码。