1. 程式人生 > >開機自啟動相關程序

開機自啟動相關程序

服務 com 4.0 for 軟件 lin tar per 重命名

軟件下載:https://github.com/kohsuke/winsw/releases

第一步:重命名WinSW.NET2.exe/WinSW.NET4.exe 為您所需要的.exe文件,主要是方便生成服務名稱。

如:如果您的windows服務器開機需要啟動nginx,則您可以命名為:nginx-service.exe

第二步:重命名配置文件,官網提供sample-allOptions.xml 和 sample-minimal.xml,重命名為:nginx-service.xml

第三步:修改xml文件,

<configuration> <!-- ID of the service. It should be unique accross the Windows system-->
<id>nginx</id> <!-- Display name of the service --> <name>nginx service</name> <!-- Service description --> <description>High Performance Nginx Service</description> <!-- Path to the executable, which should be started --> <executable>D:\nginx-1.14.0\nginx.exe</executable>

</configuration> 第四步:通過cmd命令,安裝服務 D:\nginx-1.14.0\nginx-service.exe install 第五步:啟動服務 技術分享圖片

開機自啟動相關程序