start.bat 865 B

1234567891011121314151617181920212223242526272829
  1. @echo off
  2. chcp 65001
  3. if "%1"=="h" goto begin
  4. start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
  5. :begin
  6. taskkill /IM copter-train.exe /F
  7. taskkill /IM config-server.exe /F
  8. taskkill /IM nats-server.exe /F
  9. timeout /t 1
  10. echo 启动bus服务中...
  11. cd ".\nats-bus"
  12. start config-server.exe
  13. timeout /t 3
  14. echo 启动主服务中...
  15. cd "..\"
  16. start /B copter-train.exe
  17. echo 启动完成
  18. echo "管理后台: http://ip:8101/web"
  19. @REM timeout /t 5
  20. @REM 开机自动启动
  21. @REM 创建一个快捷方式。右键点击你的批处理文件,然后选择 "创建快捷方式"。
  22. @REM 打开启动文件夹。按下 Win + R 键来打开 "运行" 对话框,然后输入 shell:startup 并按下 Enter 键。
  23. @REM 将快捷方式复制到启动文件夹。将你在第一步中创建的快捷方式复制并粘贴到启动文件夹中。