Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Incrementing the Progress Bar


3 replies to this topic

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 23 February 2006 - 13:03

Hi,
I have deferred custom actions. But when these custom actions are running the progress bar do not show any text and also it is not incremented.

Can anyone please tell me that how to add the action text to the custom action. I read the article "Adding Custom action to the Progress bar" but it is not very clear to me.

Please can anyone explain it to me.

Swati.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 February 2006 - 17:42

If you only need text but don't need to move the progress bar then you can simply add a row to the ActionText table (in Direct Editor). In the first column enter the name of your custom action, in the second column enter the text you want to display.

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 24 February 2006 - 05:06

Thanx for the reply.

But I need to do both. Add the text and increment the progress bar.

How can I achieve both.

Swati

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 24 February 2006 - 12:10

I added the text through the Action Text table and it is working fine. But the code which i added for Incrementing the progress bar is not working. I am posting the code please tell that what i am doing wrong.

function ProgressBar_Increment(hInstall)

NUMBER iResult;
HWND hRec, hProgressRec;
NUMBER nvBufferSize;

begin
hRec = MsiCreateRecord(3);
hProgressRec = MsiCreateRecord(3);

MsiRecordSetInteger(hRec, 1, 1);
MsiRecordSetInteger(hRec, 2, 1);
MsiRecordSetInteger(hRec, 3, 0);

iResult = MsiProcessMessage(hInstall, INSTALLMESSAGE_PROGRESS, hRec);

MsiRecordSetInteger(hProgressRec, 1, 2);
MsiRecordSetInteger(hProgressRec, 2, TickIncrement);
MsiRecordSetInteger(hProgressRec, 3, 0);

iResult = MsiProcessMessage(hInstall, INSTALLMESSAGE_PROGRESS, hProgressRec);

MsiCloseHandle(hRec);
MsiCloseHandle(hProgressRec);

end;

This function is called from a Custom Action which is executed for Immediate Execution before Setup Progress in UI sequence. Also, the SetupProgress dialog is subscribed to this custom action.

The custom actions which are actually doing the changes like Copying files etc come later in the sequence. Is this wrong. Do I have to write this code in each and every Custom Action. Please help. This is really confusing.

Swati