Install windows service without InstallUtil.exe

前端 未结 8 2180
我寻月下人不归
我寻月下人不归 2020-12-07 23:01

I\'m trying to deploy a windows service but not quite sure how to do it right. I built it as a console app to start with, I\'ve now turned it into a windows service project

8条回答
  •  北海茫月
    2020-12-07 23:11

    Why not just create a setup project? It's really easy.

    1. Add a service installer to the service (you do it on the seemingly useless service "design" surface)
    2. Create a setup project and add the Service output to the setup app folder
    3. Most importantly add the Service project output to all the custom actions

    Voila, and you're done.

    See here for more: http://www.codeproject.com/KB/dotnet/simplewindowsservice.aspx

    There is also a way to prompt the user for credentials (or supply your own).

提交回复
热议问题