[wix-users] Ordering Service Stop

Horr, Joe Joseph-Horr at idexx.com
Fri Sep 2 07:57:14 PDT 2022


We have a similar scenario with one of our packages where we need services to stop in a particular order yet don't want to set Windows Service dependencies between them. I discovered that the MSI will create the Service Control table in alphabetical order of the ServiceControl ID name, thus stopping and starting the services in that order. Using this, you can control the order in the generated installer by naming the ServiceControl IDs in alphabetic order of the way you want them stopped and started.
I use "a_", "b_", etc. in front of the existing ServiceControl ID names to ensure their order in the Service Control MSI table and it works great for us.

Joe Horr
Bonum est Lardo


-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Racheli Ganon via wix-users
Sent: Friday, September 2, 2022 9:22 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Racheli Ganon <r05458410430 at gmail.com>
Subject: Re: [wix-users] Ordering Service Stop

You  can use custom actions to stop each service and schedule the actions

‫בתאריך יום ה׳, 1 בספט׳ 2022 ב-19:55 מאת ‪Edwin Castro via wix-users‬‏ <‪ wix-users at lists.wixtoolset.org‬‏>:‬

> I was hoping to avoid service dependencies. We're in a weird situation 
> where we want ServiceA started before ServiceB and we also want 
> ServiceA stopped before ServiceB.
>
> --
> Edwin G. Castro
>
>
> On Wed, Aug 31, 2022 at 10:58 PM Nir Bar via wix-users < 
> wix-users at lists.wixtoolset.org> wrote:
>
> > You can set service dependencies so that ServiceB is started before 
> > ServiceA, and stopped after ithttps://
> >
> wixtoolset.org/documentation/manual/v3/xsd/wix/servicedependency.html-
> -Nir
> > BarWiX Expert ---- On Thu, 01 Sep 2022 04:54:03 +0300 
> > wix-users at lists.wixtoolset.org  wrote ----Can services to be stopped
> with
> > ServiceControl be ordered so that ServiceA is stopped before 
> > ServiceB?
> >
> > --
> > Edwin G. Castro
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant 
> > https://urldefense.com/v3/__http://www.firegiant.com/__;!!NK8mlZvK!9
> > kqhETyQxVEObbnH4JEZDks71CUcdb8ArU82-uV-PevkG3yOEIM7-clEhkE-w8YeXx_yt
> > zY7UTGuYwg0kLpWHfzol3lyUg$
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant 
> > https://urldefense.com/v3/__http://www.firegiant.com/__;!!NK8mlZvK!9
> > kqhETyQxVEObbnH4JEZDks71CUcdb8ArU82-uV-PevkG3yOEIM7-clEhkE-w8YeXx_yt
> > zY7UTGuYwg0kLpWHfzol3lyUg$
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> https://urldefense.com/v3/__http://www.firegiant.com/__;!!NK8mlZvK!9kq
> hETyQxVEObbnH4JEZDks71CUcdb8ArU82-uV-PevkG3yOEIM7-clEhkE-w8YeXx_ytzY7U
> TGuYwg0kLpWHfzol3lyUg$
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.com/v3/__http://www.firegiant.com/__;!!NK8mlZvK!9kqhETyQxVEObbnH4JEZDks71CUcdb8ArU82-uV-PevkG3yOEIM7-clEhkE-w8YeXx_ytzY7UTGuYwg0kLpWHfzol3lyUg$  


More information about the wix-users mailing list