kafka-startup.bat后台管理员权限启动


::管理员权限
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit

::后台启动
if "%1"=="hide" goto CmdBegin
start mshta vbscript:createobject("wscript.shell").run("""%~0"" hide",0)(window.close)&&exit
:CmdBegin

@echo on
ping 127.0.0.1 -n 5>nul
D:\opt\kafka_2.12-2.5.0\bin\windows\kafka-server-start.bat D:\opt\kafka_2.12-2.5.0\config\server.properties

posted @ 2021-12-17 10:58  向往明天-tsingyun  阅读(69)  评论(0编辑  收藏  举报