增加管理工具
This commit is contained in:
16
安装服务.bat
Normal file
16
安装服务.bat
Normal file
@@ -0,0 +1,16 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
net session >nul 2>&1
|
||||
if %errorLevel% == 0 (
|
||||
goto :run_script
|
||||
) else (
|
||||
echo 请求管理员权限...
|
||||
powershell -Command "Start-Process '%~f0' -Verb RunAs"
|
||||
exit /b
|
||||
)
|
||||
|
||||
:run_script
|
||||
set "MYSQL_HOME=%~dp0"
|
||||
nssm install mysqlgo "%MYSQL_HOME%bin\mysqld.exe" --defaults-file="my.ini" --console
|
||||
nssm set mysqlgo AppDirectory %MYSQL_HOME%
|
||||
Reference in New Issue
Block a user