I am using Inno Setup and I want to remove AppData\Local\MyApp during uninstall that the installer did not create but I want to give users an option to remove this data without a message box.
Here is an screen shot example of what I am trying to achieve.
Here are some examples that I have seen already.
How to clear user's app data folders with Inno Setup?
Can't delete the folder created in My Documents with Inno Setup
http://www.jrsoftware.org/ishelp/index.php?topic=uninstalldeletesection
http://www.codeproject.com/Questions/243529/Inno-Setup-ask-user-on-uninstall-if-they-want-to-k
How can my installer optionally delete some files it didn't initially create?
I want to be able to add a optional check box so if the user uninstalls the program they can remove this hidden data.. but if the users is only upgrading or plans to install later they can leave this field unchecked and not remove this generated data.
I must be missing something really simple but I just can't figure it out at the moment.
Thanks.
Here is a sample to create msg box during uninstall-
`[Code]
procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep);
var
mres : integer;
begin
case CurUninstallStep of
usPostUninstall:
begin
mres := MsgBox('Do you want to Remove settings?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
if mres = IDYES then
DelTree(ExpandConstant('{userappdata}\Myapp'), True, True, True);
end;
end;
end; `
You can change '{userappdata}\Myapp'
as you prefer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With