以系统服务运行某个程序

以系统服务运行

本程序不是一个服务程序,所以如果你要以系统服务运行,需要自己创建服务。下面给出Windows平台的创建服务方法(通过NSSM工具):

1, 将chfs.exe放在指定目录,假设为:d:\program\cutehttpfileserver
2, 到http://www.nssm.cc/download下载nssm
3, 将解压后的nssm程序放在d:\program\cutehttpfileserver中
4, 在d:\program\cutehttpfileserver中运行命令行,或运行命令行并CD至该目录
5, 假设你的服务名称为cute_http_file_service,命令行中输入:nssm install cute_http_file_service
6, NSSM会弹出配置对话框,在该对话框中输入程序路径以及运行参数
7, 启动服务,命令行中输入:nssm start cute_http_file_service



posted @ 2021-06-23 10:32  唯有暗香  阅读(331)  评论(0编辑  收藏  举报