Windows wix:卸载使用服务的应用程序需要重新启动吗?

Windows wix:卸载使用服务的应用程序需要重新启动吗?,windows,installation,wix,Windows,Installation,Wix,我们使用Wix开发了一个安装程序,卸载我们的应用程序后,它建议我们重新启动计算机。这似乎是因为我们的应用程序安装了Windows服务 如果我们有停止服务、注销服务等的代码,是否有任何方法可以避免重新启动?您需要使用ServiceControl元素: <ServiceControl Id="ServiceController" Start="install" Stop="both" Remove="uninstall" Name="{NameOfYourService}"/> 这

我们使用Wix开发了一个安装程序,卸载我们的应用程序后,它建议我们重新启动计算机。这似乎是因为我们的应用程序安装了Windows服务


如果我们有停止服务、注销服务等的代码,是否有任何方法可以避免重新启动?

您需要使用
ServiceControl
元素:

<ServiceControl Id="ServiceController" Start="install" Stop="both" Remove="uninstall" Name="{NameOfYourService}"/>

这将:

  • 安装后启动服务
  • 安装和卸载时停止服务
  • 卸载时删除服务

如果您需要,这些文档将随时提供。

将在下周试一试。。。我只是讨厌强制重启!:)