I use immediate custom actions as targets of Publish/DoAction events all the
time. They can't log and Windows Installer's UI doesn't always recognize
property value changes while still on the same page, but they do work.

Only actions sequenced in InstallExecuteSequence need to be deferred. No
action run (directly or indirectly) from InstallUISequence should ever be
deferred.

-----Original Message-----
From: Pound, Robert (CDC/OCOO/ITSO) (CTR) [mailto:u...@cdc.gov] 
Sent: Friday, December 10, 2010 5:36 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Need to run a CA, or equivalent, between 2 dialogs



Scenario:
1. I have several (let's say 4) custom dialogs.  The first dialog conatins a
list control so the installer can select the 'environment' (i.e.,
production, test, qa, dev, etc.0.  this list is populated dynamically by a
custom action.  The custom action allows the developer (person building the
wix files) to specify (via properties) the different types of environments.
This works great.
2. Custom dialogs 2-4 display different values in control fields, based upon
the environment selected in the first dialog.

Current Approach:
The developer must create a property for each combination of environment and
value (for dialogs 2-4).  Then the developer must a length list of
conditional publish statements for the list control in dialog , to set the
value of the dialog 2-4 fields property.
Advantage: it works
Disadvantage: difficult to maintain, increases opportunity for developer
error

The Problem:
I would like to create a custom action, or equivalent functionality that
will run after dialog 1, but before dialog 2-4.  This custom action function
would inspect the property for the environment (set in dialog 1), and then
set the specified property to another property based upon the environment.
I have a custom action where I build the correct environment sensitive
values.  I can get custom actions to run before dialog 1 (which doesn't
help) or after all dialogs (which is too late).  How can I insert
conditional functionality that is dynamic in nature (remember the developer
controls the values of items in the environment list control, which will
correspond with the number of potential default values specified)?

Ideally (in a perfect world) I could insert a function/custom action after
Dialog 1.  If I try to use the "Publish Event="DoAction" to call a custom
action, the CA must be deferred and does not happen when I need it to,
between dialogs 1 and 2.

Any help, suggestions, or ideas will be appreciated.

Thanks,
Bob

SNIPPETS:
Dialog 1 List Box Control:

<Control Id="EnvironmentList" Type="ListBox" X="45" Y="73"

Width="100" Height="60" TabSkip="no"

Property="propInstallEnvironment" Sorted ="no">

<ListBox Property="propInstallEnvironment" >

<!-- List items added by Custom Action "PopulateEnvironmentList" -->

</ListBox>

<!-- Set Appropriate Default Values for WebSite DIALOG -->

<Publish Property ="WEB_ADDRESS" Value ="[Development.WEB_ADDRESS]">

<![CDATA[propInstallEnvironment = "Development" AND Development.WEB_ADDRESS
<> ""]]>

</Publish>

<Publish Property ="WEB_ADDRESS" Value ="[QA.WEB_ADDRESS]">

<![CDATA[propInstallEnvironment = "QA" AND QA.WEB_ADDRESS <> ""]]>

</Publish>

<Publish Property ="WEB_ADDRESS" Value ="[Test.WEB_ADDRESS]">

<![CDATA[propInstallEnvironment = "Test" AND Test.WEB_ADDRESS <> ""]]>

</Publish>

<Publish Property ="WEB_ADDRESS" Value ="[Production.WEB_ADDRESS]">

<![CDATA[propInstallEnvironment = "Production" AND Production.WEB_ADDRESS <>
""]]>

</Publish>



Sample Dialog 2-n List Box Control:

<Control Id="WebSiteAddressEdit" Type="Edit" X="45" Y="85" Width="220"
Height="18" Property="WEB_ADDRESS" Text="{32}" />



Sample of how developer is current setting default values (in main wxs
file):

<!-- WEB SITE DEFAULTS-->

<Property Id ="Development.WEB_ADDRESS" Value="1.2.3.4" />

<Property Id ="Test.WEB_ADDRESS" Value="2.2.3.4" />

<Property Id ="QA.WEB_ADDRESS" Value="3.2.3.4" />

<Property Id ="Production.WEB_ADDRESS" Value="4.2.3.4" />






----------------------------------------------------------------------------
--
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to