How to make a .NET Windows Service start right after the installation?

前端 未结 8 1524
再見小時候
再見小時候 2020-11-22 10:49

Besides the service.StartType = ServiceStartMode.Automatic my service does not start after installation

Solution

Inserted this code on my Pr

8条回答
  •  萌比男神i
    2020-11-22 11:46

    Use the .NET ServiceController class to start it, or issue the commandline command to start it --- "net start servicename". Either way works.

提交回复
热议问题