Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update progress text while executing one custom action?

Tags:

c#

wix

I want to update the progress text when executing one custom action. I have done the following things:

  1. declare my custom action to be deferred
  2. use below code to reset the progress bar

    private static void ResetProgress(Session session)
    {
        Record record = new Record(4);
        record[1] = "0";
        record[2] = "1000";
        record[3] = "0";
        record[4] = "0";
        session.Message(InstallMessage.Progress, record);
    }
    
  3. use below code to move the progress bar:

    private static void NumberOfTicksPerActionData(Session session, int ticks)
    {
        Record record = new Record(3);
        record[1] = "1";
        record[2] = ticks.ToString();
        record[3] = "1";
        session.Message(InstallMessage.Progress, record);
    }
    
  4. use below code to update the progress text:

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

However, I have failed to update the progress text and move the progress bar.

Any one can help me? If this custom action needs to process sequential actions, how should I update the status on the progress bar while executing this custom action.

I know that I can use

<ProgressText Action="UnzipDataBase">Now installing database files, this may take a few minutes!</ProgressText>

to set progress text to tell what this custom action is doing. But how to update the status while executing this custom action?

like image 672
user2392468 Avatar asked May 17 '13 07:05

user2392468


1 Answers

Did you put the ProgressText inside UI element? For example

<UI>
   <ProgressText Action="UnzipDataBase">Now installing database files, this may take a few minutes!</ProgressText>
</UI>
like image 100
IlirB Avatar answered Oct 15 '22 19:10

IlirB