开发者

wix: uninstall of application which uses a Service requires restart?

We developed an installer using Wix, and after uninstalling our app it suggests that we reboot the computer. It seems due to our app having installed a Win开发者_JAVA百科dows Service.

Is there any way we can avoid reboot, maybe if we have some code which stops the service, unregisters it, etc?


You need to use the ServiceControl element:

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

This will:

  • start the service after installing
  • stop the service when both installing and uninstalling
  • remove the service when uninstalling

The docs are here if you need them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜