View Full Version : how, a progress bar

07-09-2007, 05:17 PM
can anybody show me how to operate a progress bar control on a dialog?
I created a blank dialog and drag a progress bar onto it. now I want to use a VBscript CA to display the progress bar, let's say, vbscript will run a simple for-loop to add 1 each time, and the progress bar will show the increment.

how could I do that? I did search this forum and get some documents but no more lucks.

I am using Basic MSI and installScript will not work on me.:(

Thanks a lot.

07-10-2007, 08:49 AM
Please see this thread for one approach to updating the progress bar from VBScript actions.

07-10-2007, 09:56 AM

thanks a lot but I already read this post many times. and I am new to this. I have a silly question:
where I should put the example code function into?

if I have a blank dialog including a progress bar, named progressBar1, how to bind this "progressBar1" with the CA function in this post?

Please see this thread for one approach to updating the progress bar from VBScript actions.

07-11-2007, 10:11 AM
That code is for updating the progress bar on the SetupProgress dialog box, which is when lengthy actions commonly take place, and you might see if you can get it to work there before attempting anything different.

As mentioned in that thread, there are two connected actions: an immediate-mode action to increase the total number of "ticks" on the progress bar, and a deferred-mode action that actually increments the progress at run time.

Please also see the MSI help topic "Adding Custom Actions to the ProgressBar".

Tim Mayert
10-23-2007, 08:22 AM
Did you get this working?

I am also looking at updating the progress bar, but I just need the main progress bar updated. I did try Robert's VBScript code to create 2 custom actions, one for Immediate and one for Deferrred modes and when running the install I did not notice any change in the progress bar. I then increase the size from 5000000 to 15000000 just to see if I can notice any difference and I still did not. Has anyone got this to work and if so what exactly did you do?

Again all I want is to launch an executable during the install, that will perform a bunch of tasks silently, which can vary in time, and I need to progress bar to show that something is still happening so the user does not think the install is hung. And I would like to run this exe in wait mode, where the Basic MSI install will wait for it to be done. So if we can not make progress bar show something if the custom action is ran in wait mode, then I'll need the install to updated the progressbar as a time delay and simply have the custom action run in non-wait mode.

Anyways if anyone has got the progress bar to indicate more time/ticks then could you help me out here.


Tim Mayert
10-25-2007, 01:48 PM
I have now attempted to use the sample that is in the help - the C++ custom action and I was able to get it somewhere, still not exactly right, but at least I got some thing to show.

Now when I try to add ticks it make it to where it places them or starts them near the end of the progress bar. I was wondering what I would have to do to have the bar empty out and start fresh when it comes to my task?

I see that the bar alread does this during the sequence, it looks like it does it about 2-3 times already. So is there anyway that I could do the same thing? When it hits my custom action it will simple restart the progress bar and show a smooth increase instead of trying to add ticks at the end of the bar.

Any help would be appreciated.\