Greetings WiX Users!

Not so long ago I posted my dilemma regarding Custom Actions not persisting
session data through to UI dialogs... I modified the ExitDialog to have a
button that took you to further configuration options so that it could read
in default options from the deployed App.Config file that was installed with
the installer's payload as defaults in the edit fields...

A gentleman suggested I get back inline with the common expected methodology
of MSI installers to take the configuration options BEFORE the installation
deployed its payload, and so I did that.

I'm running into a problem, however, that my CustomAction
(LoadDefaultOptions), while called very early in the UI sequence, doesn't
seem to EXECUTE until after InstallInitialize occurs, which is beyond the
time I need the data generated by the Custom Action!

I have a database setting dialog (ModifyConfigOptionsDlg)  that occurs in
the UI Sequence after the WelcomeDlg. As you can see in the log below,
LoadDefaultOptions gets called initially just after FindRelatedProducts
(Before="LaunchConditions"). HOWEVER, though it is called there, the actual
execution doesn't seem to occur until after InstalIInitialize, which is
AFTER the ModifyConfigOptionsDlg is shown to the user, too late in the
process to provide the defaults in session variables to the dialog. Notice
that I have set the Return="asyncWait", which I would THINK would pause the
script until the CA completed, but that is not the behavior the log or
application seems to be exhibiting...

Is there a reason that my CA is not executing when it is called in the
script, and waiting until InstallInitialize?

This is the pertinent data from my WIX XML definition:

=========================
<Binary Id="BatchCustomerAnalysisWIXCustomActionsPackage.dll"
SourceFile="BatchCustomerAnalysisWIXCustomActionsPackage.dll" />
    <CustomAction Id="LoadDefaultOptions" Return="asyncWait"
Execute="immediate"
BinaryKey="BatchCustomerAnalysisWIXCustomActionsPackage.dll"
DllEntry="LoadDefaultOptions"/>
    <CustomAction Id="SetConfigOptions" Return="check" Execute="immediate"
BinaryKey="BatchCustomerAnalysisWIXCustomActionsPackage.dll"
DllEntry="SetConfigOptions"/>

    <!-- InstallUISequence happens before the InstallExecuteSequence and is
only executed when the UI is displayed (not with the /qb option) -->
    <InstallUISequence>
      <!-- This runs the App.Config Reader to load the session vars for
settings in the prompts -->
      <Custom Action="LoadDefaultOptions" Before="LaunchConditions" />
    </InstallUISequence>
    <InstallExecuteSequence>
      <RemoveExistingProducts After="InstallFinalize"/>
      <!-- This will fail the installer if a newer installed version is
detected -->
      <ScheduleReboot Suppress="yes"></ScheduleReboot>
      <Custom Action="SetConfigOptions" After="InstallFinalize" />
    </InstallExecuteSequence>
=========================

This is the log generated during a fresh install up to the point of the
LoadDefaultOptions custom action executing:
=========================
=== Logging started: 7/26/2010  13:28:13 ===
Action 13:28:13: INSTALL.
Action start 13:28:13: INSTALL.
Action 13:28:13: FindRelatedProducts. Searching for related applications
Action start 13:28:13: FindRelatedProducts.
Action ended 13:28:13: FindRelatedProducts. Return value 1.
Action 13:28:13: LoadDefaultOptions.
Action start 13:28:13: LoadDefaultOptions.
Action 13:28:13: LaunchConditions. Evaluating launch conditions
Action start 13:28:13: LaunchConditions.
Action ended 13:28:13: LaunchConditions. Return value 0.
Action 13:28:13: ValidateProductID.
Action start 13:28:13: ValidateProductID.
Action ended 13:28:13: ValidateProductID. Return value 1.
Action 13:28:13: CostInitialize. Computing space requirements
Action start 13:28:13: CostInitialize.
Action ended 13:28:13: CostInitialize. Return value 1.
Action 13:28:13: FileCost. Computing space requirements
Action start 13:28:13: FileCost.
Action ended 13:28:13: FileCost. Return value 1.
Action 13:28:13: CostFinalize. Computing space requirements
Action start 13:28:13: CostFinalize.
Action ended 13:28:13: CostFinalize. Return value 1.
Action 13:28:13: WelcomeDlg.
Action start 13:28:13: WelcomeDlg.
Info 2898. For WixUI_Font_Normal textstyle, the system created a 'Tahoma'
font, in 1 character set, of 13 pixels height.
Info 2898. For WixUI_Font_Bigger textstyle, the system created a 'Tahoma'
font, in 1 character set, of 19 pixels height.
Action 13:28:13: WelcomeDlg. Dialog created
Info 2898. For WixUI_Font_Normal__UL textstyle, the system created a
'Tahoma' font, in 0 character set, of 13 pixels height.
Action 13:28:14: ModifyConfigOptionsDlg. Dialog created
Info 2898. For WixUI_Font_Title textstyle, the system created a 'Tahoma'
font, in 1 character set, of 14 pixels height.
Action 13:28:19: InstallDirDlg. Dialog created
Action 13:28:20: WixUIValidatePath.
Action start 13:28:20: WixUIValidatePath.
Action ended 13:28:20: WixUIValidatePath. Return value 1.
Action 13:28:20: VerifyReadyDlg. Dialog created
SFXCA: Extracting custom action to temporary directory:
C:\DOCUME~1\ELOY06~1\LOCALS~1\Temp\MSI1FD7.tmp-\
Action ended 13:28:21: WelcomeDlg. Return value 1.
Action 13:28:21: ProgressDlg.
Action start 13:28:21: ProgressDlg.
Action 13:28:21: ProgressDlg. Dialog created
Action ended 13:28:21: ProgressDlg. Return value 1.
Action 13:28:21: ExecuteAction.
Action start 13:28:21: ExecuteAction.
SFXCA: Binding to CLR version v2.0.50727
Action 13:28:21: INSTALL.
Action start 13:28:21: INSTALL.
Action 13:28:21: FindRelatedProducts. Searching for related applications
Action start 13:28:21: FindRelatedProducts.
Action ended 13:28:21: FindRelatedProducts. Return value 0.
Action 13:28:21: ValidateProductID.
Action start 13:28:21: ValidateProductID.
Action ended 13:28:21: ValidateProductID. Return value 1.
Action 13:28:21: CostInitialize. Computing space requirements
Action start 13:28:21: CostInitialize.
Action ended 13:28:21: CostInitialize. Return value 1.
Action 13:28:21: FileCost. Computing space requirements
Action start 13:28:21: FileCost.
Action ended 13:28:21: FileCost. Return value 1.
Action 13:28:21: CostFinalize. Computing space requirements
Action start 13:28:21: CostFinalize.
Action ended 13:28:21: CostFinalize. Return value 1.
Action 13:28:21: InstallValidate. Validating install
Action start 13:28:21: InstallValidate.
Action ended 13:28:21: InstallValidate. Return value 1.
Action 13:28:21: InstallInitialize.
Action start 13:28:21: InstallInitialize.
Calling custom action
aeServerDbDialog!BatchCustomerAnalysisWIXCustomActions.Program.LoadDefaultOptions
===================
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to