Update KMS部署V1.1.bat

pull/87/head
HappyLeslieAlexander 5 months ago committed by GitHub
parent b6e0803404
commit a79e6a6a98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,57 +1,57 @@
@echo off
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
cd /d "%~dp0"
title KMS服务器一键部署脚本V1.1
title KMS服务器一键部署脚本V1.1
color 2
:start
echo -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
echo 本脚本由Leslie Alexander编写基于Github开源项目vlmcsd旨在部署KMS服务器
echo 注意KMS服务器不能激活KMS服务器本身
echo 本脚本默认使用目录下的vlmcsd.exe该程序为64位如果你运行在32位的Windows上请手动删除原本的vlmcsd.exe然后把vlmcsd_x32.exe重命名为vlmcsd.exe
echo 仅供学习和研究使用,一切使用该脚本的盗版行为与作者无关
echo 本脚本由Leslie Alexander编写基于Github开源项目vlmcsd旨在部署KMS服务器
echo 注意KMS服务器不能激活KMS服务器本身
echo 本脚本默认使用目录下的vlmcsd.exe该程序为64位如果你运行在32位的Windows上请手动删除原本的vlmcsd.exe然后把vlmcsd_x32.exe重命名为vlmcsd.exe
echo 仅供学习和研究使用,一切使用该脚本的盗版行为与作者无关
echo Telegram:@LeslieAlexander E-mail:banspam@vtqpy.onmicrosoft.com
echo 继续则默认您同意以上说明
echo 继续则默认您同意以上说明
echo -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
echo 请输入要执行的操作:
echo [install]开始部署服务
echo [uninstall]移除服务
echo [stop]停止服务
echo [setup]启动服务
echo [key]查看各版本Windows及Office密钥
echo [readme]关于作者
set /p choice=请输入选择:
echo 请输入要执行的操作:
echo [install]开始部署服务
echo [uninstall]移除服务
echo [stop]停止服务
echo [start]启动服务
echo [key]查看各版本Windows及Office密钥
echo [readme]关于作者
set /p choice=请输入选择:
if /i "%choice%"=="install" goto install
if /i "%choice%"=="uninstall" goto uninstall
if /i "%choice%"=="stop" goto stop
if /i "%choice%"=="setup" goto setup
if /i "%choice%"=="start" goto setup
if /i "%choice%"=="key" goto key
if /i "%choice%"=="readme" goto readme
:install
echo 即将开始部署,请键入日志文件存放地址:
set /p URI=请输入地址:
echo 正在部署...
echo 即将开始部署,请键入日志文件存放地址:
set /p URI=请输入地址:
echo 正在部署...
vlmcsd.exe -s -l %URI%\KMS.log
echo 正在启动服务...
echo 正在启动服务...
sc query state= inactive | findstr /c:"Key Management Server"
net start "Key Management Server"
echo 正在添加防火墙入站规则...
echo 正在添加防火墙入站规则...
netsh advfirewall firewall add rule name=KMS1688 dir=in action=allow protocol=TCP localport=1688
pause
cls&goto start
:uninstall
echo 您确认要移除服务吗?
echo 您确认要移除服务吗?
pause
echo 正在移除服务...
echo 正在移除服务...
sc query state= inactive | findstr /c:"Key Management Server"
net stop "Key Management Server"
sc delete vlmcsd
echo 正在移除防火墙规则...
echo 正在移除防火墙规则...
netsh advfirewall firewall delete rule name=KMS1688
echo 移除成功!请手动选择是否删除日志文件
echo 移除成功!请手动选择是否删除日志文件
pause
cls&goto start
@ -61,7 +61,7 @@ net stop "Key Management Server"
pause
cls&goto start
:setup
:start
sc query state= inactive | findstr /c:"Key Management Server"
net start "Key Management Server"
pause
@ -218,9 +218,8 @@ pause
cls&goto start
:readme
echo 本脚本由Leslie Alexander创作vlmcsd是Github上Wind4的开源作品脚本基于vlmcsd创作旨在简单快捷地部署KMS服务器让优秀的开源项目易用
echo 由于本人繁忙此脚本将不定时更新。如有BUG请联系我E-mailbanspam@vtqpy.onmicrosoft.com Telegram:@LeslieALexander
echo 如果你有能力,请赞助我,这里感激不尽!
echo 作者保证本脚本安全Believe it or not
echo 本脚本由Leslie Alexander创作vlmcsd是Github上Wind4的开源作品脚本基于vlmcsd创作旨在简单快捷地部署KMS服务器让优秀的开源项目易用
echo 由于本人繁忙此脚本将不定时更新。如有BUG请联系我E-mailleslie@leslieblog.top Telegram:@LeslieALexander
echo 如果你有能力,请赞助我,谢谢!
pause
cls&goto start
cls&goto start

Loading…
Cancel
Save