Install windows service without InstallUtil.exe

前端 未结 8 2183
我寻月下人不归
我寻月下人不归 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:05

    You can still use installutil without visual studio, it is included with the .net framework

    On your server, open a command prompt as administrator then:

    CD C:\Windows\Microsoft.NET\Framework\v4.0.version (insert your version)
    
    installutil "C:\Program Files\YourWindowsService\YourWindowsService.exe" (insert your service name/location)
    

    To uninstall:

    installutil /u "C:\Program Files\YourWindowsService\YourWindowsService.exe" (insert your service name/location)
    

提交回复
热议问题