[wix-users] Start windows service with some parameters only once

Christopher Painter chrpai at iswix.com
Mon Feb 19 12:09:36 PST 2018


My only other question would be what are you doing on that first time?   I caution against doing installation activities during that first run as that's pretty much self registration.


________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Russell Haley via wix-users <wix-users at lists.wixtoolset.org>
Sent: Monday, February 19, 2018 1:38 PM
To: WiX Toolset Users Mailing List
Cc: Russell Haley
Subject: Re: [wix-users] Start windows service with some parameters only once

On Mon, Feb 19, 2018 at 6:02 AM, Oleg Kolomiytsev via wix-users
<wix-users at lists.wixtoolset.org> wrote:
> Hi all,
> I am looking for a way to start windows service via wixtoolset with some
> parameters only once (during installing my app). I am trying to achive this
> goal with "Arguments" attribute from "ServiceInstall" element but params are
> passed each time I restart my service.
>
>         <ServiceInstall Id="Service Id"
>                         Name="Service Name"
>                         DisplayName="Service Display Name"
>                         Interactive="yes"
>                         Vital="yes"
>                         Start="auto"
>                         Type="ownProcess"
>                         Description="Service Description"
>                         ErrorControl="normal"
>                         Arguments="--param" />
>
> Is there a way to pass arguments to windows service only once (when
> application is installed)

Chris is currently schooling me on other things but I'll throw my two
cents in there.

As an example I have a windows service that checks for parameters on
*command line* startup and does stuff, then exists before trying to
start the service. With that in mind, I ask: are you trying to "run it
as an application" once, or start the service once? A potential
solutions for running it as an application is to create a custom
action that calls a batch script. This requires you know the
parameters you wish to pass when you create your installer.

>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/

WiX Support | WiX Experts and Resources from FireGiant<http://www.firegiant.com/>
www.firegiant.com
WiX Support | Installation, Development, Deployment | WiX Experts and Resources from FireGiant




____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

WiX Support | WiX Experts and Resources from FireGiant<http://www.firegiant.com/>
www.firegiant.com
WiX Support | Installation, Development, Deployment | WiX Experts and Resources from FireGiant





More information about the wix-users mailing list