Pls. echo.echo Press any key to exit. echo.pausenul exit) g

时间:2021-09-04 07:00:20

标签:

@echo off&setlocal EnableDelayedExpansion&color 5e
title KMS_Activation for Windows 7 - (Comlan)

echo ::::::::::::::::::::::::::::::::::::::::::::::::
echo :: 自动查抄 Win7 的版本,导入相应的 KMS 密钥 ::
echo :: ::
echo :: 然后连接指定的 KMS 处事器激活 Win7 ::
echo :: ::
echo :: 2017-10 ::
echo ::::::::::::::::::::::::::::::::::::::::::::::::
echo.&echo.

:: 如果激活掉败,可能是因为连不到KMS处事器了,
:: 你仅需改削下面的KMS处事器地点

set KMS_Sev=172.19.34.146

::======================= 以下内容无需变动 ======================
call :adminchk

set Professional=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
set ProfessionalN=MRPKT-YTG23-K7D7T-X2JMM-QY7MG
set ProfessionalE=W82YF-2Q76Y-63HXB-FGJG9-GF7QX
set Enterprise=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
set EnterpriseN=YDRBP-3D83W-TY26F-D46B2-XCKRJ
set EnterpriseE=C29WB-22CC8-VJ326-GHFJW-H9DH4J

for /f "tokens=3 delims= " %%i in (‘reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"‘) do set EditionID=%%i

if defined %EditionID% (
cscript //Nologo %windir%\system32\slmgr.vbs /ipk !%EditionID%!
cscript //Nologo %windir%\system32\slmgr.vbs /skms %KMS_Sev%
cscript //Nologo %windir%\system32\slmgr.vbs /ato
) else (
echo.&echo Not found DEFINED Key: "%EditionID%".
echo.
)
pause
exit

:adminchk
reg query "HKU\S-1-5-19" >nul 2>nul || (
cls&echo.&echo Run as ADMINISTRATOR, Pls.
echo.&echo Press any key to exit.
echo.&pause>nul
exit)
goto :EOF

Win7_KMS_激活脚本