Is the issue that the FilesInUse dialog is popping up before your service
is stopped and declaring files in use when those files will be unlocked
when the service stops?

It's unfortunate but all the information related to whether you are doing a
removal or not is discovered at that point. In theory you could have an
unconditioned (or conditioned as NOT UPGRADINGPRODUCTCODE) immediate custom
action which tries to shut down the service before InstallValidate in the
exec sequence (and either does nothing or fails silently if the service
isn't there, because it will be run on install, uninstall, repair, modify,
you name it).

The problem you have here, however is that this is before you get UAC
elevation and stopping a service is an elevated action. You'd need to
provide a bootstrapper, and have it elevate your entire install process. It
gets a little messy.


On 29 August 2013 13:26, Alain Forget <afor...@cmu.edu> wrote:

> Why aren't you using the ServiceInstall element to install your service?
> If there is any way at all to use it, instead of a CA, I think most of us
> would strongly recommend it. At the very leat, you'll eaily be able to stop
> your service before uninstall.
>
> -----Original Message-----
> From: nkshirsagar [mailto:nkshirsa...@gmail.com]
> Sent: Thursday, August 29, 2013 08:19
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] stop a service before uninstall
>
> I install a windows service as a custom action during the install. During
> uninstall, I want to remove this service before the filesinUse dialogbox
> pops up.
>
> My condition is REMOVE="ALL" for the uninstallation script to run, and I
> read on
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa371626(v=vs.85).aspx
> that "any custom action that depends on REMOVE=ALL must be sequenced after
> the InstallValidate action"
>
> Can anyone help me stop the process cleanly through WIX through a custom
> action before the filesInUse pops up?
>
>
>
>
>
> --
> View this message in context:
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/stop-a-service-before-uninstall-tp7588564.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to