Reputation: 187
I use Inno Setup to make installer for my app. When user uninstall the app I want to delete my custom folder in Program Data
folder, my folder is large (about 15 GB) so I use [UninstallDelete]
section to delete this folder:
[UninstallDelete]
Type: filesandordirs; Name: "{commonappdata}\testFolder"
But when the Inno Setup gets to the [UninstallDelete]
section, the progress bar is show at 20% and stop in this position for a long time, then it "jumpy" to 100%.
So how to make progress bar increase steadily when uninstall the app?
Thanks!
Upvotes: 2
Views: 540
Reputation: 202088
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
Upvotes: 1