Last active
August 29, 2015 14:05
-
-
Save mistic100/ae4c51f4a80854c14658 to your computer and use it in GitHub Desktop.
[InnoSetup] Ask for delete config file on uninstall
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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