You can remove the Sleep from the example. I used it to show the progress bar
with several pauses. In a real application, your function would call the
"DisplayActionData" function at times when you decide to show a message and
increment the bar. Now that I think about it, my DisplayActionData function
works best in very long functions that want to keep the user updated on the
many small jobs that are occurring. 

If you just want to have the progress bar increment without having to send a
new ActionData message (in other words, just have the progress bar increment
on an interval), then you can use a different function.

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

Maybe call that in a loop until the ticks match the total number of ticks in
the progress bar, then reset and start over. You could continue until the
job is complete.
This page has more info about the Message method: 
http://msdn.microsoft.com/en-us/library/aa371672(VS.85).aspx
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Show-the-ProgressBar-while-Running-the-Custom-Action-tp5078136p5136384.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to