Skip to content

Instantly share code, notes, and snippets.

@mistic100
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mistic100/ae4c51f4a80854c14658 to your computer and use it in GitHub Desktop.
Save mistic100/ae4c51f4a80854c14658 to your computer and use it in GitHub Desktop.
[InnoSetup] Ask for delete config file on uninstall
#define SettingsFile "settings.xml"
[CustomMessages]
english.DeleteSettings=Delete settings file?
[Code]
// ask for delete config file during uninstall
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
case CurUninstallStep of
usUninstall:
begin
if MsgBox(ExpandConstant('{cm:DeleteSettings}'), mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then
begin
DelTree(ExpandConstant('{app}\{#SettingsFile}'), False, True, False);
end
end;
end;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment