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

Oleg Kolomiytsev o.kolomiytsev at avantize.com
Mon Feb 19 07:59:03 PST 2018


Thanks, got it.


19.02.2018 17:52, Christopher Painter пишет:
>
> There is no reasonable way that I can think of.   The best thing that 
> comes to mind is you always pass the parameter but then have the 
> service store state somewhere (like a registry value)  so that it can 
> read that on the next start and choose to bypass whatever that 
> parameter is supposed to be doing.
>
>
> You'd have to define exactly when this parameter should be done 
> again.   If I uninstall and reinstall would you want it to do that 
> flow again?   You might want to use PackageCode and DateTime as part 
> of your parameters so the service has enough information to decide 
> whether it needs to run again when storing it's state and evaluating it.
>
>
>
> ------------------------------------------------------------------------
> *From:* wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf 
> of Oleg Kolomiytsev via wix-users <wix-users at lists.wixtoolset.org>
> *Sent:* Monday, February 19, 2018 8:02 AM
> *To:* wix-users at lists.wixtoolset.org
> *Cc:* Oleg Kolomiytsev
> *Subject:* [wix-users] Start windows service with some parameters only 
> once
> 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)
>
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/ <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