安装Windows服务方法

用sc create 服务名 binPath="路径",不要用老方法InstallUtil会出现一堆的错误

原文地址:https://www.cnblogs.com/xiaomen/p/9370131.html