Progress Bar jump into 100% completion half-way installation

Got a problem you cannot solve? Try here.
danieltan
Posts: 26
Joined: Tue Jul 07, 2015 9:17 pm

Progress Bar jump into 100% completion half-way installation

Postby danieltan » Sun Aug 16, 2015 11:25 pm

Refer on similar thread: http://www.installaware.com/forum/viewtopic.php?f=2&t=2819

As I know progress bar allows show user the progression installation but sadly in dialog "update_install" installer showing progress bar directly jumps to 100% completion while my installation still in halfway (consist large files ~2gb).

How to set progress bar correctly beside set variable PROGRESSMODE TO MARQUEE?
especially in-between line "Run Program $SUPPORTDIR$\$UPDATE_NAME$.exe $UPDATE_PARAMETERS$ $SILENTVAR$ REBOOTCOMPUTER=FALSE RUNAPP=FALSE REBOOTNOW=CANCEL (WAIT)"
Attachments
Install updates 2.png
Install updates 2.png (37.35 KiB) Viewed 8163 times

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Progress Bar jump into 100% completion half-way installa

Postby FrancescoT » Tue Aug 18, 2015 8:28 am

Dear Danieltan,

the progress-bar position is entirely handled by the the value of "PROGRESS" pre-defined variable.

"PROGRESS: Initially 0. A numerical representation of the current position in installation progress, where 0 is nothing and 100 is complete. This value is displayed in progress dialogs."

You may set and increment such variable in different place of your script, in order to control the progress bar position as you prefer.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Progress Bar jump into 100% completion half-way installa

Postby bokkie » Tue Aug 18, 2015 8:42 am

Daniel,

Here's a http://www.installaware.com/progress_bars.pdf overview I did about progress bars a long time ago. It might not be 100% what you're looking for but it explains aspects about progress bars in case you want to use them in your own dialogs and MSIcode at a later time.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

danieltan
Posts: 26
Joined: Tue Jul 07, 2015 9:17 pm

Re: Progress Bar jump into 100% completion half-way installa

Postby danieltan » Wed Aug 19, 2015 9:34 pm

Code: Select all

label: Main loop
if Variable ABORT Equals TRUE
Terminate Installation
end
PROGRESS = $PROGRESS$ + 1
if Variable PROGRESS not Equals 100
Comment: Do something here...
Run Program dir , startup in folder C:\Temp (WAIT)
GoTo Label: Main loop
end


After tested the program with above code, I believe this code will loop for 99 times only it will stop which will make installer doing same redundant thing for over 99 times to run a program.

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Progress Bar jump into 100% completion half-way installa

Postby bokkie » Thu Aug 20, 2015 2:49 am

Daniel,

It's intended to provide a guide only. It's purely illustrative so think of it as a University Challenge (BBC TV quiz series) "starter-for-ten" context and not necessarily best practice. What you do in your loop, how often, and what value you set the percentage to is arbitrary. There's no reason why you can't start at 100% and work your way backwards to 1%. :)
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

danieltan
Posts: 26
Joined: Tue Jul 07, 2015 9:17 pm

Re: Progress Bar jump into 100% completion half-way installa

Postby danieltan » Thu Aug 20, 2015 7:34 pm

bokkie wrote:Daniel,

It's intended to provide a guide only. It's purely illustrative so think of it as a University Challenge (BBC TV quiz series) "starter-for-ten" context and not necessarily best practice. What you do in your loop, how often, and what value you set the percentage to is arbitrary. There's no reason why you can't start at 100% and work your way backwards to 1%. :)


Thanks Bokkie.

From what I believe, Run Program code unable to determine which stage progression
FYi, I do try other alternative way which may not as perfect as below:

Code: Select all

label: Main loop
if Variable ABORT Equals TRUE
Terminate Installation
end
PROGRESS = $PROGRESS$ + 1
if Variable PROGRESS not Equals 100
Comment: Do something here...
Run Program dir , startup in folder C:\Temp (WAIT)
set Variable PROGRESS to 99
GoTo Label: Main loop
end

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Progress Bar jump into 100% completion half-way installa

Postby bokkie » Fri Aug 21, 2015 4:42 am

Daniel,

I understand what you are saying and, yes, once Run Program has given control to the program its running, then it's very unlikely the progress bar could be updated to provide feedback especially when you're dealing with a 2GB file. I know it can be done with a Dotnet plugin because plugins can communicate with a progress bar in a dialog using a callback. But that's probably not going to help you because it comes back to the "update_install" you mentioned at the beginning and whatever that does internally probably has no such mechanism to provide feedback.

I really don't know then if there's a solution to your long-running task sitting on 100% for what seems like forever. If I do think of something I will let you know but right now I really can't think of anything. :(
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 111 guests