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