找回密码
 加入
搜索
查看: 2979|回复: 9

[系统综合] 备份恢复win7的批处理(待转AU3)?[已解决]

  [复制链接]
发表于 2016-12-11 22:13:14 | 显示全部楼层 |阅读模式
本帖最后由 cashiba 于 2017-3-18 09:32 编辑

最近重装系统,windows7激活工具常常会被杀软阻扰不胜其烦。
想到备份还原windows7的激活信息.
网上这类工具好用的不是太多。论坛里初步搜索了一下,好像还没有这类的工具。
原理基本上就是下面的软文所述。
目前只是抽空零碎的在学习AU3,还不会用AU3操控windows以及把批处理转AU3。所以先贴出来给有兴趣的和用得着的兄弟们一观.....
1。备份激活文件“批处理”
---------------------------------------------------------------------------
@echo off
copy %windir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms
copy %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat
pause
exit
---------------------------------------------------------------------------
——将以上白色字符复制/粘贴到记事本,另存为“备份激活文件.bat”即可。
2。恢复激活文件“批处理”
---------------------------------------------------------------------------
@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
---------------------------------------------------------------------------
——将以上白色字符复制/粘贴到记事本,用激活该系统时所使用的密钥替换其中的XXXXX-XXXXX-XXXXX-XXXXX-XXXXX,另存为“恢复激活文件.bat”即可。
查看密钥:
开始菜单--运行命令--slmgr.vbs -dlv--确定
查看电脑密钥工具:
http://www.veryhuo.com/down/html/62427.html
发表于 2016-12-12 09:26:42 | 显示全部楼层
之前也寫過類似的
只不過是整合成一個bat~
发表于 2016-12-12 11:31:40 | 显示全部楼层
copy %windir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms
第一句,我意没有看懂
发表于 2016-12-12 11:31:43 | 显示全部楼层
copy %windir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms
第一句,我意没有看懂
 楼主| 发表于 2016-12-12 17:28:40 | 显示全部楼层
本帖最后由 cashiba 于 2016-12-12 17:48 编辑
copy %windir%\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms
第一句,我意没有看懂
漠北雪~狼 发表于 2016-12-12 11:31

等同于:C:\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms
Copy Source [Target]
 楼主| 发表于 2016-12-12 17:34:45 | 显示全部楼层
之前也寫過類似的
只不過是整合成一個bat~
w60711 发表于 2016-12-12 09:26

这个序列号XXXXX-XXXXX-XXXXX-XXXXX-XXXXX不知道怎么用命令或代码获取。
slmgr.vbs -dlv这个命令看到的是不完整的序列号.....
发表于 2016-12-12 23:04:07 | 显示全部楼层
BAT转AU3看看
发表于 2016-12-16 16:45:18 | 显示全部楼层
 楼主| 发表于 2016-12-16 18:06:13 | 显示全部楼层
tubaba 发表于 2016-12-16 16:45

 楼主| 发表于 2016-12-17 21:15:20 | 显示全部楼层
windows10的激活备份好像跟windows7又不一样,网上搜了一下,暂时没找到与上相似的批处理代码,也没找到相关的好用的工具.....
等找到了再发这个帖子里。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-29 20:29 , Processed in 0.081650 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表