Unable to install windows service with the help of InstallUtil tool

我的未来我决定 提交于 2019-12-04 23:58:37

Ok, there are couple of things:

1) You need projectInstaller.
2) YourProject -> properties; Startup project -> YourProject.Program
3) build
4) “Run as Administrator” the command prompt!

Everything works now.

complete tutorial link

I don't have a copy of VS2012 to test it now, but I believe that your problem has something to do with the

I don't have projectInstaller class in my windows service app

part.

From msdn:

Installation components register an individual service on the system to which it is being installed and let the Services Control Manager know that the service exists

It seems trivial, but check carefully when you are writing the installutill arguments, because you could confuse the exe file of the service with another exe file generated by the compilation of a referenced project (that has no service installers) and make it fail.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!