The installer has no idea how long it will take (because it depends). The progress bar is mostly arbitrary just, so user know something is happening. It just can’t end before the installation is completed. That’s why it’s most often stuck on 99%. Other option is adding x% after each complete step, but all steps are not equally long.
TLDR.: No one is gonna waste time trying to make accurate progress bar.
Latest Answers