Inno Setup: How to handle progress bar on [UninstallDelete] section?

时光怂恿深爱的人放手 提交于 2019-12-06 04:12:26

I do not think it's really possible.

There's no way to predict how long the deleting will work without prolonging the operation considerably. You would have to count the number of the files in advance and then delete them one by one, calculating the progress. But counting the files will likely take considerable time too. So it won't help you much, it might actually make it even worse. And the installation will get stuck too, while calculating (you cannot predict at all how long will that take).


Try to delete (not recycle) the folder in Windows File Explorer. And check how long the operation is in the "Calculating" phase.

In my test, it took 1/3 of the deleting time.


Instead of trying to show a real progress, you can display an indefinite/marquee progress bar (i.e. like Explorer does above). And maybe display a count of deleted files to allow the user see, that something is progressing.


I actually do not think, you need to make the uninstallation user experience that good. What about only showing message saying:

This may take few minutes...


Your follow up question:
Inno setup - Progress bar doesn't show when uninstall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!