开发服务

选择serviceProcessInstaller1,account选择localsystem

Windows服务开发学习

选择serviceInstaller1,description为windows服务运行时候的描述信息,ServiceName为运行在服务里面的服务名称

Windows服务开发学习
注意:服务运行的路径为C:\Windows\System32,获取程序运行路径使用AppDomain.CurrentDomain.BaseDirectory;

安装服务

安装服务bat脚本

%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe E:\wcfService\WinServiceWCF.exe
pause

卸载服务bat脚本

%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\installutil.exe /u E:\wcfService\WinServiceWCF.exe
pause

相关文章:

  • 2022-03-06
  • 2021-09-08
  • 2021-05-21
  • 2021-09-01
  • 2022-01-01
  • 2021-11-19
猜你喜欢
  • 2021-07-26
  • 2022-01-09
  • 2021-05-20
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案