If the option is given at the end of the install, you've missed your 
opportunity to let Windows 
Installer do it for you, so you're only option is to use a custom action.  The 
command "sc start 
<servicename>" should start the service, assumming you have the 'start a 
service' right, which isn't 
guaranteed.  Services are usually an 'always running' concept.  If the user is 
installing your 
product, surely they want the service running?  Why would they install it 
otherwise?

Rob

Lewis G. Pringle, Jr. wrote:
> I’m using the latest daily build of Wix v3.
> 
>  
> 
> I have a windows service I’m installing, and I’ve found I can do:
> 
>  
> 
>               <ServiceControl Id="MyServiceCtrl"
> 
>                               Name="MyService"
> 
>                               Stop="both"
> 
>                               />
> 
>  
> 
> To install my service without starting at installation time, or:
> 
>  
> 
>               <ServiceControl Id="MyServiceCtrl"
> 
>                               Name="MyService"
> 
>                               Stop="both"
> 
> Start="install"
> 
>                               />
> 
> To get it to run automatically after installation.
> 
>  
> 
>  
> 
> Next, I added a checkbox to a configuration dialog:
> 
>  
> 
>         <Control Id="StartServiceNow" Type="CheckBox" X="110" Y="120" 
> Width="330" Height="18" CheckBoxValue="1" Integer="yes" 
> Property="STARTSERVICEATENDOFINSTALL" Text="Start Service After 
> Installation"/>
> 
>  
> 
> And I tried to modify the <servicecontrol> tag as follows:
> 
>  
> 
>               <ServiceControl Id="MyServiceCtrl"
> 
>                               Name="MyService"
> 
>                               Stop="both"
> 
> Start="[STARTSERVICEATENDOFINSTALL]"
> 
>                               />
> 
>  
> 
> Now I gather I might need to change the values of the checkbox to be 
> ‘install’ or ‘’, but that seems to miss the point, since it looks like 
> the wix compiler is rejecting having any variable string at all for the 
> ‘Start=’ attribute.
> 
>  
> 
> Is there some other way I can make starting the service at the end of 
> install optional?
> 
>  
> 
>                         Lewis.
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to