將批處理文件作爲 Windows 服務運行 - Run batch file as a Windows service

問題:

In order to run one application, a batch file has to be kicked off (which does things like start Jetty, display live logs, etc).爲了運行一個應用程序,必須啓動一個批處理文件(它執行諸如啓動 Jetty、顯示實時日誌等)。 The application will work only if this batch file is running.僅當此批處理文件正在運行時,應用程序纔會工作。 I am hence forced to have this batch file running and not logout from the Windows server.因此,我被迫運行此批處理文件,而不是從 Windows 服務器註銷。

Can this batch file be run as a service?這個批處理文件可以作爲服務運行嗎? I am experimenting with one of the suggestions from a similar question .我正在試驗來自類似問題的建議之一。


解決方案:

參考一: https://en.stackoom.com/question/1k49
參考二: https://stackoom.com/question/1k49
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章