1、cmd指令,只支持服务软件,一般的控制台运行不起来
sc create ceshi binpath= D:\ceshi\ceshi.exe type= own start= auto displayname= ceshi
2、c# 新建windows服务项目
3、NSSM工具
4、Topshelf 搭建 Windows 服务 C#类库
sc create ceshi binpath= D:\ceshi\ceshi.exe type= own start= auto displayname= ceshi