我无法让 NSSM 运行批处理脚本,并且控制台在桌面上可见。我已经尝试将其设置为交互式过程,但仍未显示。任何想法?
以下是我创建服务的命令。
nssm install "MyNginxStartup" "C:\project\nginx-1.18.0\start_nginx_server.bat"
nssm set "MyNginxStartup" DisplayName "NGINX Startup Service"
nssm set "MyNginxStartup" Description "Starts NGINX Server on Windows startup."
nssm set "MyNginxStartup" AppExit 0 Exit
nssm set "MyNginxStartup" AppExit 1 Exit
nssm set "MyNginxStartup" AppExit 2 Exit
nssm set "MyNginxStartup" Start SERVICE_DELAYED_AUTO_START
nssm set "MyNginxStartup" Type SERVICE_INTERACTIVE_PROCESS