I made a script which installs several applications (Adobe Reader, Spotify, Microsoft Office, etc.). It's used after Windows installation. I would like to display estimated remaining time of current installation.
The problem is it differs per computer. How to calculate remaining time using
- time taken to install previous applications,
- amount of applications in total and
- the count of already installed applications.
Average wouldn't help since some applications install 10 seconds and other 5 minutes. How to resolve this issue?
It is impossible to (accurately) calculate remaining time.
Cost of operation is defined by amount of CPU cycles but bears no relation to time as cycle management is controlled by factors external to the program requesting them. As a result, even two consecutive executions (same program, same system) vary by time needed to complete. As for:
DataGenetics - Progress Bars (estimating "moving averages")
Pragmatic solution is to update (
GUICtrlCreateProgress()
usingGUICtrlSetData()
) after each install:$iProgress = ( $iAmountProgramsInstalled / $iAmountProgramsTotal ) * 100