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

前端 未结 8 1322
再見小時候
再見小時候 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条回答
  •  粉色の甜心
    2020-11-22 11:38

    To start it right after installation, I generate a batch file with installutil followed by sc start

    It's not ideal, but it works....

提交回复
热议问题