[wix-users] Progress messages from c# custom action to burn UI

Phill Hogland phill.hogland at rimage.com
Mon Nov 30 06:26:23 PST 2015


I did something similar in my C++ CA and also did not initially observe the ActionData progress messages.  I also had to modify the ExecuteMsiMessage handler in my mba as it was only displaying ActionStart messages.  To get a feel for the behavior I added debug logging to the handler to dump all of the parameters of ExecuteMsiMessage to the log.  Since there are many ActionData messages that are not related to my CA, I also added code to filter the ActionData messages and display only the messages that were desired.

I saw a post from 2013 which indicated that WixStdBa did not support displaying ActionData messages at that time, but that there was discussion about adding the support.
http://stackoverflow.com/questions/15872126/wix-installation-using-burn-to-have-manged-ui-displaying-same-progress-text

I did not determine if it was added or how to enable the support in the WixStdBA, but if you are not seeing the ActionData messages it is probably because by default they are not displayed in the BA.  A workaround that I came across before I realized that I needed to modify my mba, was to us a ActionStart message in the CA loop rather than ActionData messages.


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Woolhead
Sent: Wednesday, November 25, 2015 5:10 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Progress messages from c# custom action to burn UI

[Not sure what happened there!  Try again]

Hi, I'm trying to get progress messages from my custom action into burn, but not getting it to work yet!


I've started with

        <UI>
            <ProgressText Action="DeployDatabaseInstallExecute" Template="Deploying Database: [1]"/>
        </UI>

I've added the following functions to my C# action

        protected static void ResetProgress(Session session, int maxTicks)
        {
            var record = new Record(4)
            {
                [1] = "0",
                [2] = maxTicks.ToString(),
                [3] = "0",
                [4] = "0"
            };
            session.Message(InstallMessage.Progress, record);
        }

        protected static void NumberOfTicksPerActionData(Session session, int ticks)
        {
            var record = new Record(3)
            {
                [1] = "1",
                [2] = ticks.ToString(),
                [3] = "1"
            };
            session.Message(InstallMessage.Progress, record);
        }

        protected static void DisplayActionData(Session session, string message)
        {
            var record = new Record(1) {[1] = message};
            session.Message(InstallMessage.ActionData, record);
        }


And then in my differed action I have something like:

   ResetProgress (session, 3)
   NumberOfTicksPerActionData (session, 1)
   DisplayActionData (session, "DB 1")
   DisplayActionData (session, "DB 2")
   DisplayActionData (session, "DB 3")

But I'm not see any progress messages.

Could someone point me in the right direction?

Cheers,

Stephen.


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list