frp启动
rem 域名:t.maoriaty.top,端口:80cd /d "E:\JabinDOC\软件备份\frp_0.13.0_windows_amd64"start ./frpc -c ./frpc.ini
nginx启动
rem 练习案例指向E:\JabinDOC\Demo,端口7777set nginx_home=C:\nginx-1.12.0cd /d %nginx_home%tasklist | findstr /i "nginx.exe"echo %errorlevel%if %ERRORLEVEL% == 0 ( goto stop_nginx goto start_nginx goto end)else ( rem else后要有空格 goto start_nginx goto end):stop_nginx taskkill /F /IM nginx.exe /T:start_nginx rem 以字符串格式启动 start "" "nginx.exe" pause:end
wampserver启动
rem 以管理员运行@echo off>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"if '%errorlevel%' NEQ '0' (goto UACPrompt) else ( goto gotAdmin ):UACPromptecho Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs""%temp%\getadmin.vbs"exit /B:gotAdminif exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )pushd "%CD%"CD /D "%~dp0"rem 启动wampserverset wamp_path=C:\wamp64cd /d %wamp_path%tasklist | findstr /i wampmanager.exeecho %errorlevel%if %ERRORLEVEL% == 0 ( goto stop_wamp goto start_wamp)else ( goto start_wamp):stop_wamp taskkill /f /im wampmanager.exe /t:start_wamp start "" "wampmanager.exe"
tomcat启动
rem Tomcat项目启动根目录转到E:\JabinDOC\Tomcat_wwwset CATALINA_HOME=D:\software\deploy\apache-tomcat-8.0.36-oldcall D:\software\deploy\apache-tomcat-8.0.36-old\bin\startup.bat