Automatically start a Windows Service on install

前端 未结 13 1367
轻奢々
轻奢々 2020-11-28 19:13

I have a Windows Service which I install using the InstallUtil.exe. Even though I have set the Startup Method to Automatic, the service does not start when installed, I have

13条回答
  •  感动是毒
    2020-11-28 19:49

    Just a note: You might have set up your service differently using the forms interface to add a service installer and project installer. In that case replace where it says serviceInstaller.ServiceName with "name from designer".ServiceName.

    You also don't need the private members in this case.

    Thanks for the help.

提交回复
热议问题