- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Progress Bar
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Progress Bar
I've tried searching but nobody is doing what I need.
Basically I want to use the progress bar within Installshield but I don't care about text. I just want to update the progress bar based off of a dynamic number.
I've seen several examples but none of them explain anything well nor use a text-less approach.
function CA_Progress(hInstall) // increment the progress bar
NUMBER iResult;
HWND hRec, hProgressRec;
NUMBER nvBufferSize;
begin
hRec = MsiCreateRecord(3);
hProgressRec = MsiCreateRecord(3);
// Tell the installer to use explicit progress messages.
MsiRecordSetInteger(hRec, 1, 1);
MsiRecordSetInteger(hRec, 2, 1);
MsiRecordSetInteger(hRec, 3, 0);
iResult = MsiProcessMessage(hInstall, INSTALLMESSAGE_PROGRESS, hRec);
//Specify that an update of the progress bar's position in
//this case means to move it forward by one increment.
MsiRecordSetInteger(hProgressRec, 1, 2);
MsiRecordSetInteger(hProgressRec, 2, szSizeTickIncrement);
MsiRecordSetInteger(hProgressRec, 3, 0);
// The following tells the installer to send a message to update
// the progress bar.
iResult = MsiProcessMessage(hInstall, INSTALLMESSAGE_PROGRESS, hProgressRec);
MsiCloseHandle(hRec);
MsiCloseHandle(hProgressRec);
end;
For the above example. What the heck is "hInstall"?
If I plan to only use the progress bar can I reduce the code to this?
function CA_Progress(hInstall) // increment the progress bar
NUMBER iResult;
HWND hProgressRec;
begin
hProgressRec = MsiCreateRecord(3);
//Specify that an update of the progress bar's position in
//this case means to move it forward by one increment.
MsiRecordSetInteger(hProgressRec, 1, 2);
MsiRecordSetInteger(hProgressRec, 2, szSizeTickIncrement);
MsiRecordSetInteger(hProgressRec, 3, 0);
// The following tells the installer to send a message to update
// the progress bar.
iResult = MsiProcessMessage(hInstall, INSTALLMESSAGE_PROGRESS, hProgressRec);
MsiCloseHandle(hProgressRec);
end;
Don't I need to pass the control ID for the progress bar somewhere? This whole thing to use a progress bar seems whack. There aren't any straight answers anywhere.
I'm looking for exact steps please. Thanks.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sorry for all the woes with this one. If it is any consolation, I am having to work with this too. In my case, I am launching an inner setup (basic msi) and trying to capture the output and feed it to the outer parent msi to show progress. This is really a chore!
In your case, I don't think you are too far away. You have the sample code. The hInstall refers to the handle for the current msi. There are some notes out there that may be of help. Here is one I found earlier:
http://community.macrovision.com/showthread.php?t=161418&page=2
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
So I've chosen to use a text approach which will look somewhat similar to other installs.
Round 1
Steps Description
Step 1: Doing Task1 Task 1 Details
Step 2: Doing Task2 Task 1 Details
Step 3: Doing Task3 Task 1 Details
Round 2
[CODE]
Steps Description
Step 1: Doing Task1 [DONE] Task 2 Details
Step 2: Doing Task2 Task 2 Details
Step 3: Doing Task3 Task 2 Details[/CODE]
And so on. At least as I work on this, I know that it will work and I can control every aspect of any and everything using my custom actions and controls within IS.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Ok so it seems that progress bars can only be used during the Install phase!!??? Well in my installer I have some progress bar worthy actions that need to run BEFORE installation. My MSI DLL hangs on MsiProcessMessage probably because it is trying to send a progress bar message BEFORE the Installation part has begun. Windows installer, Basic MSI and InstallShield = "Black Art" mainly because documentation and examples are so woefully lacking clarity. So I think it's time to give up trying to approach my problem using a custom dialog, some custom actions, and a MSI DLL as its just too impossible. Instead I'll just have to resort to running a program. A hack, well yes but better than constantly jumping though hoops and it will get the job done faster.