Howard
Howard

Reputation: 4604

How to add a confirm task during uninstall section by using inno setup?

I have a user data located at user's folder such as : C:\Users\Administrator\profile.ini

I know how to delete it:

[UninstallDelete]
Type: files; Name: "C:\Users\{username}\profile.ini"

The thing is i don't want to delete this file silently, i need the end-user informed about this operation with a checkbox, like "[ ] Delete user data". If end-user checks it, delete this file, otherwise do nothing.

I have two questions:

  1. Is there a way to get the current logging user's folder? I don't think it's a good way like what i did above "C:\Users{username}\". But i couldn't find any constant for doing this.

  2. Is it possible to add a checkbox at the beginning of uninstallation?

Upvotes: 3

Views: 3585

Answers (1)

Deanna
Deanna

Reputation: 24313

The uninstaller does not support making changes to the wizard UI.

You can however use normal [Code] to prompt the user with a custom form or message box. See this answer to a similar question for a sample.

Upvotes: 5

Related Questions