public static MessageResult ResetProgressBar(Session session, int
totalStatements)
{
var record = new Record(3);
record[1] = 0; // "Reset" message
record[2] = totalStatements; // total ticks
record[3] = 0; // forward motion
return session.Message(InstallMessage.Progress, record);
}
public static MessageResult IncrementProgressBar(Session session)
{
var record = new Record(3);
record[1] = 2; // "ProgressReport" message
record[2] = 1; // ticks to increment
record[3] = 0; // ignore
return session.Message(InstallMessage.Progress, record);
}
If you get a result of MessageResult.Cancel, it means the user pressed the
cancel button on the progress dialog and you'll want to exit your custom action
cleanly with ActionResult.UserExit.