views:

146

answers:

1

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 Windows Service.

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

+2  A: 

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.

alimbada
Will give it a try next week... I just hate forced reboots! :)
Martin
Any luck with this?
alimbada