I am installing a Windows Service which I need the user to indicate if
they want the service started on install or not, and if it is started
there is a SQL Script I have to execute. I'm using the script below to
install the service, but am not sure how to conditionally start the
service or how to execute a SQL script only if the service is started. 

 

<Component Id="Broker_Component"
Guid="{E2BEE2E0-A920-4aea-B4F1-A6E4D26DA21E}">

     <File Id="Broker.exe" Name=".exe" LongName="BrokerService.exe"
Source="$(var.temp.directory)\BrokerService.exe" DiskId="1"/>

     <ServiceInstall Id="Service_Component" Name="Broker"
DisplayName="Broker" Type="ownProcess" Start="demand"
ErrorControl="normal" Account="[ACCOUNTDOMAIN]\[ACCOUNT]"
Password="[ACCOUNTPASSWORD]"/>

     <ServiceControl Id="Service_Component2" Name="Broker"
Start="install" Stop="uninstall" Remove="uninstall" Wait="no"/>

</Component>

 

Appreciate the help.

 

Cheers

 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to