Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 7 激活備份與還原教學:備份兩大核心文件,重裝系統後自動激活

編輯:Win7 系統基礎知識

使用 MAK 金鑰聯網啟用 Windows 7 企業版或專業版,曾是一段機遇期;憑藉「神 Key」啟用旗艦版則靠運氣。當這些管道失效時,如何透過備份 Windows 7 的兩個關鍵激活文件,在重裝系統後實現離線自動激活?本文提供一套簡單實用的批處理腳本方案,讓您輕鬆掌握激活備份與還原的完整流程。

一、 製作兩個批處理文件

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(存檔類型選「所有檔案」,副檔名必須為 .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 ***XX-***XX-***XX-***XX-***XX
cscript %windir%\system32\slmgr.vbs -ato
pause
exit

將上述內容存為 還原激活文件.bat,並將腳本末尾的 ***XX-***XX-***XX-***XX-***XX 替換為您原本啟用系統時使用的產品金鑰。

二、 使用步驟

  1. 將兩個 .bat 檔案放在任意磁碟的同一資料夾。以「系統管理員身分執行」備份激活文件.bat,即可在旁邊生成 pkeyconfig.xrm-ms 與 tokens.dat 兩個備份檔。
  2. 重裝作業系統後,在完全斷網的情況下(切勿連網),以「系統管理員身分執行」還原激活文件.bat,系統即可自動完成激活。

三、 關鍵提醒

  • 製作 .bat 前,請在「資料夾選項」取消勾選「隱藏已知檔案類型副檔名」,另存時選「所有檔案」。
  • 備份時必須右鍵選「以系統管理員身分執行」,否則無法複製系統保護檔案。
  • 若備份失敗,可嘗試在安全模式下操作,或啟用內建 Administrator 帳戶(控制台→管理工具→電腦管理→本地用戶和群組→用戶→Administrator→屬性→取消「帳戶已停用」)。
  • 兩個備份檔必須與還原批處理放在同一資料夾,不可移動,否則還原將失效。

附錄:文中另收錄多組歷史「神 Key」供參考,但隨著微軟伺服器端封鎖,成功率已極低,建議以正版授權為主。

Copyright © Windows教程網 All Rights Reserved