简体   繁体   English

如何在安装后启动Topshelf服务?

[英]How can I start my Topshelf service after installation?

I have a Topshelf service that is working great. 我有一个运作良好的Topshelf服务。 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, 最低限度,在安装后使用start动词从命令行运行服务,例如,

.\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. 请注意,您可能希望从以管理模式运行的命令提示符执行此操作,这与您通常在Windows系统上安装软件的方式一致。 For more discussion, see the answer here . 有关更多讨论,请参阅此处的答案。

Refer to the command line documentation here for other helpful commands. 有关其他有用的命令,请参阅此处的命令行文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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