用C#写的Windows服务在Win7中安装时出现如下错误:
![](https://i-blog.csdnimg.cn/blog_migrate/92cd1dd53ddff99955c6c9a21bef1d16.jpeg)
解决方法:
1 安装服务的脚本写在bat文件中,一定要注意路径,如下
D:\Project\JXW\Code\WorkFlow\FlowServer\installutil.exe D:\Project\JXW\Code\WorkFlow\FlowServer\FlowServer.exe
pause
net start ShineFlow.FlowServer
2 在bat文件上点击右键-》以管理员身份运行。
3 成功安装服务,如下:
![](https://i-blog.csdnimg.cn/blog_migrate/48e95bdce1772c76e167d717cceadbd1.jpeg)
转载于:https://blog.51cto.com/oec2003/1049743