简体   繁体   中英

How can I start my Topshelf service after installation?

I have a Topshelf service that is working great. It installs with Automatic startup and I can start/stop the service just fine. My problem is that the service requires a user to start it initially.

Is there a standard way of starting the service immediately after installation?

Minimally, run the service from the command line with the start verb after it has been installed, eg,

.\MyService.exe start

Note that you'll probably want to do this from a command prompt running in administrative mode, which is consistent with how you typically install software on Windows systems. For more discussion, see the answer here .

Refer to the command line documentation here for other helpful commands.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM