Skip to content

Commit

Permalink
Ask to delete settings directory on uninstall (fix #2745)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Jul 12, 2022
1 parent ba8a806 commit 2b1976f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/windows-setup/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,19 @@ begin
SaveStringToFile(ExpandConstant('{localappdata}') + '\Bionus\Grabber\innosetup.ini', '[general]' + #13#10 + 'language=' + ExpandConstant('{language}') + #13#10, False);
end;
end;
{ Pop-up to ask to delete AppData settings }
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then begin
if MsgBox('Do you also want to delete your settings directory?', mbConfirmation, MB_YESNO) = IDYES
then begin
Log('Deleting settings directory');
if DelTree(ExpandConstant('{localappdata}\Bionus\Grabber'), True, True, True) then begin
Log('Deleted settings directory');
end else begin
MsgBox('Error deleting settings directory', mbError, MB_OK);
end;
end;
end;
end;

0 comments on commit 2b1976f

Please sign in to comment.