1

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?

user4157124
  • 2,809
  • 13
  • 27
  • 42
shawwy
  • 122
  • 1
  • 12
  • 1
    You're approaching the "halting problem." There's no way to definitely tell when the install(s) will finish; define a more pragmatic goal. – gregory Feb 12 '17 at 17:42

1 Answers1

2

… how could I calculate the remaining time if I know time taken to install previous applications, the count of applications in total and the count of already installed applications.

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:

… any idea how could i resolve this issue.

user4157124
  • 2,809
  • 13
  • 27
  • 42