This is one of those cases where I'd forget the ordering restriction you're 
attempting.  Assuming you own the service, just install it and start it, and 
make it smart enough to just finish if the right driver isn't there.  Put a 
message in the event log if you like. This seems to satisfy your requirements 
that the service not run if the driver isn't there, and also allows a user to 
install the driver later and have everything just work.

Phil Wilson

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, September 08, 2008 9:38 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Start Service conditionaly

Hello,
I tried to execute the CA before the CostInitialize action but it wont be
executed (logfile / verbose). If I put the CA after CostInitialize it will
be executed and the property is set to 1, but the file wont be installed
and the service wont be started.
Is there anz other way? Can I divide the start of a service and the
installation of the .exe? In case that the condition will work someday the
next problem will appear:
If the condition is false the file wont be installed, but I want it to be
installed in both cases!
Thank you,
Chris

postingbox wrote:

> When should I execute the CA or is there another way to handle this
>
Per the MSI SDK doc: Any standard or custom actions <custom_actions.htm>
that affect costing should be sequenced before the CostInitialize action.

Check out a verbose install log to see the actions MSI is planning to
take with each component.

------------------------------------------------------------------------------

Hello,
I have following situation - I want to install an .exe and start it as a
service

<Component Id="SERV_Arcserv.exe"
Guid="{C28EA890-4649-4A33-801F-BD846B8E3A55}">
        <File Id="SERV_Arcserv.exe" Name="Arcserv.exe" KeyPath="yes"
Source="Services\Arcserv.exe"/>
        <ServiceInstall Id="ServInst_Arcserv" Name="ARCSERV"
Start="auto" Type="ownProcess" ErrorControl="normal"/>
        <ServiceControl Id="ServCont_Arcserv" Name="ARCSERV"
Start="install" Remove="uninstall" Wait="yes" Stop="uninstall"/>
        <Condition><![CDATA[(HASARCNET="1")]]></Condition>
</Component>

The default value of the Property HASARCNET is 0. With the help of a
Custom Action I set it to 1 if the arcnet driver is installed.
The Property is set to 1 as I see it in the log but the file wont be
installed and the service wont be started.
If I use a lower Sequencenumber for the CA, the CustomAction fails - I
see it in the log.
When should I execute the CA or is there another way to handle this
Thank you,
Chris






-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to