- 因为Process.Manage.Service.exe程序为Windows服务程序,不能直接双击打开,所以需要借助windows系统自带InstallUtil.exe程序来启动它。
 -  
  
以管理员身份运行cmd命令控制台窗口

 -  
  
输入命令进入到InstallUtil.exe程序所在的文件夹
cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
注:InstallUtil.exe此程序为windows安装服务的工具,需要借助InstallUtil.exe程序安装我们自己开发的windows服务,上述为InstallUtil.exe的路径,在这里需要注意的是InstallUtil.exe的版本号
 -  
  
安装我们自己开发的windows服务程序Process.Manage.Service.exe
InstallUtil.exe "D:\Process.Manage.Service\bin\Debug\Process.Manage.Service.exe"
注:-  
如下图,我们已经看到输出信息:已成功安装服务MyServcie,这个MyService是我们自定义命名默认设置的名称,可以在代码中设置这个服务名称。

 -  
我们也可以在Windows本地服务中查看到此服务已经安装,此服务的启动类型默认为自动(开机自启动服务),我们可以鼠标右键属性中更改启动方式。

 -  
代码程序Process.Manage.Service中所设置的服务名称

 
 -  
 -  
  
启动这个我们已经安装好的windows服务
net start MyServive注:MyService为服务名称,从第3个步骤中我们看出Process.Manage.Service.exe应用程序的服务名称为“MyService”,所以我们只需要启动这个服务即可,此服务为永久性服务,如果我们不需要启动,则执行卸载服务的操作即可。
-  
停止这个windows服务
net stop MyServive -  
如何卸载这个windows服务
InstallUtil.exe /u "D:\Process.Manage.Service\bin\Debug\Process.Manage.Service.exe" 
 -  
 





![[ Tool ] celery分布式任务框架基本使用](https://img-blog.csdnimg.cn/direct/6dc4eed4bd4c4a76890d2a794654e20c.png)













