【发布时间】:2018-05-13 20:07:10
【问题描述】:
这两个服务安装程序中哪一个更可取(以及为什么),我在不同的网站上都提到过(以及在 stackoverflow Automatically start a Windows Service on install 和 How to automatically start your service after install? 上)。
// Auto Start the Service Once Installation is Finished.
this.AfterInstall += (s, e) => new ServiceController("service").Start();
this.Committed += (s, e) => new ServiceController("service").Start();
【问题讨论】:
标签: c# windows-services