Still not working. I tried the workaround mentioned in Richard's blog but to no avail. I have now created the following sample installer to try to get this to work.
C# Test custom action using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Deployment.WindowsInstaller; using System.Threading; namespace LongCustomAction { public class CustomActions { [CustomAction] public static ActionResult CustomAction1(Session session) { session.Log("Begin CustomAction1"); Thread.Sleep(10000); System.Console.Beep(); session["RESULTS"] = "1"; return ActionResult.Success; } } } WIX Code (snipets) <Binary Id='CustomActions' SourceFile='LongCustomAction.CA.dll'/> <!-- Run Async --> <CustomAction Id="TestLongAction1" BinaryKey="CustomActions" DllEntry="CustomAction1" Execute="immediate" HideTarget="no" Return="asyncWait"/> <!-- Run Sync --> <CustomAction Id="TestLongAction2" BinaryKey="CustomActions" DllEntry="CustomAction1" Execute="immediate" HideTarget="no" Return="check"/> <!-- In my initial dialog I set the following inside the Next Button and the call my TestDlg--> <Publish Property="RESULTS" Value="2">1</Publish> <!-- In the TestDlg I do the following--> <Control Id="TestButton" Type="PushButton" X="100" Y="100" Width="66" Height="18" Text="Test" TabSkip="no" Default="yes"> <Publish Event="SpawnWaitDialog" Value="ValidatingDialog"><![CDATA[RESULTS <> 2]]></Publish> <Publish Event="DoAction" Value="TestLongAction1">1</Publish> <Publish Property="RESULTS" Value="[RESULTS]">1</Publish> </Control> <!-- Validating dialog --> <Dialog Id="ValidatingDialog" X="50" Y="50" Width="330" Height="101" Title="Validation" ErrorDialog="no"> <Control Id="MessageText" Type="Text" X="60" Y="25" Width="260" Height="50" Text="Validating data. Please wait..." TabSkip="no"/> <Control Id="CancelDlg" Type="PushButton" X="230" Y="72" Width="81" Height="21" Text="Cancel" TabSkip="yes"> <Publish Event="EndDialog" Value="Return">1</Publish> </Control> </Dialog> With the CA run in async mode (using TestLongAction1 definition in the DoAction) The Please wait dialog is displayed but does not beep until I cancel the dialog and then cancel the installation. With the CA run in sync mode (using TestLongAction2 definition in the DoAction) The Please wait dialog is displayed but does not beep until 10 seconds after I cancel the dialog. (For some reason the SpawnWaitDialog is blocking the CA from running) If I change the order around and run the CA first then display the dialog I hear the beep and the Please wait dialog is never displayed just as I would expect since the CA set the property preventing it from displaying. So where do I go from here? Has anyone gotten SpawnWaitDialog to work? Is there any system dependency issues? Thanks again for the help - I need to get this working for a release. Tom -----Original Message----- From: Blair [mailto:os...@live.com] Sent: Friday, October 30, 2009 8:37 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] UI Display question According to Richard, the conditions employed by the dialogs don't recognize changes to the properties unless you "set" the property to the new value of that property. Based on that, I suggest the following: <Publish Property="DATA_VALID" Value="2"/> <Publish Event="SpawnWaitDialog" Value="ValidatingDialog"><![CDATA[DATA_VALID <> 2]]></Publish> <Publish Event="DoAction" Value="ValidateDataImmediate"/> <Publish Property="DATA_VALID" Value="[DATA_VALID]"/> <Publish Event="SpawnDialog" Value="ValidationFailed"><![CDATA[DATA_VALID = 0]]></Publish> <Publish Event="NewDialog" Value="[DataDlg_Next]"><![CDATA[DATA_VALID = 1]]></Publish> His blog is http://legalizeadulthood.wordpress.com/2009/10/23/ui-custom-action-guideline s/ and the section of interest is where he mentions the "workaround". -----Original Message----- From: Tom Crozier [mailto:tcroz...@rackwise.com] Sent: Friday, October 30, 2009 4:59 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] UI Display question Anyone have any idea on how to get SpawnWaitDialog to work? I have tried various ways without success. (Calling the custom action as check and asyncWait) Setting various options on the dialog SystemModal, Modeless, KeepModeless as well. Calling DoAction before SpawnWaitDialog as well as after. >From what I can tell if I run the custom action synchronously Calling the CA first then calling SpawnWaitDialog the custom action does not run until after I manually close the dialog. If I run the custom action first then the dialog never displays. If I run the custom action asynchronously Calling the CA first then calling SpawnWaitDialog the custom action does not run until after I manually close the dialog. If I run the custom action first then the dialog I have to manually close the dialog. I am running out of ideas. -----Original Message----- From: Tom Crozier [mailto:tcroz...@rackwise.com] Sent: Friday, October 30, 2009 9:36 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] UI Display question Thanks for the reply Bob, but I have tried using the SpawnWaitDialog control without success. What am I missing? I have attempted the following: I set the initial value of a property that my DTF custom action sets (it sets the property to either 1 or 0). Call the SpawnWaitDialog (The dialog just has a Text control to display Validating - Please wait...) Then call the custom action Display a failed dialog if not successful Otherwise go on to the next screen Code: Inside my Next Button control I do the following: <Publish Property="DATA_VALID" Value="2">1</Publish> <Publish Event="SpawnWaitDialog" Value="ValidatingDialog"><![CDATA[DATA_VALID <> 2]]></Publish> <Publish Event="DoAction" Value="ValidateDataImmediate">1</Publish> <Publish Event="SpawnDialog" Value="ValidationFailed"><![CDATA[DATA_VALID = 0]]></Publish> <Publish Event="NewDialog" Value="[DataDlg_Next]"><![CDATA[DATA_VALID = 1]]></Publish> Results: The Validating dialog is displayed forever. - I added a button on the validation dialog to publish "EndDialog" and when I press it, the dialog goes away and starts running the custom action. So the action is not getting run while the dialog is up. - If I add the Modeless="yes" and KeepModeless="yes" properties on the validating dialog it pops up and goes away immediately. Other combinations of attributes do not see to make a difference. - I attempted to move the DoAction to invoke the custom action inside of the validating dialog. But adding a publish event under a Text control does not seem to get invoked when the dialog is displayed. Thanks for your help - Tom -----Original Message----- From: Bob Arnson [mailto:b...@joyofsetup.com] Sent: Thursday, October 29, 2009 7:52 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] UI Display question Tom Crozier wrote: > In my installer I validate data on a dialog by performing a DoAction event (calling a custom action) on a next button press. It can take a minute or more to validate so I need to either display a popup dialog saying "Validating - Please wait..." or display the text on top of the current dialog. Then when the action finishes remove the dialog or text and proceed to the next dialog. > Use a SpawnWaitDialog control event before your CA. -- sig://boB http://joyofsetup.com/ ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.423 / Virus Database: 270.14.24/2449 - Release Date: 10/29/09 07:38:00 ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.423 / Virus Database: 270.14.24/2449 - Release Date: 10/30/09 07:52:00 ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.423 / Virus Database: 270.14.24/2449 - Release Date: 10/30/09 07:52:00 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users