Skip to content

Commit

Permalink
build: Add option to skip uninstaller question
Browse files Browse the repository at this point in the history
  • Loading branch information
vasylskorych committed Jul 14, 2024
1 parent 6066c4f commit 9f2179b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions DyssolInstallers/Scripts/Main.iss
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,17 @@ procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then
begin
if MsgBox('Delete all configuration files?'+#13#10+'This includes a list of recently opened files, paths to models and materials database, etc.', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then
begin
DeleteFile(ExpandConstant('{autoappdata}\{#MyAppName}\{code:FileConfigIni}'));
end;
if ExpandConstant('{param:skipaskconfig|no}') = 'no' then
begin
if MsgBox('Delete all configuration files?'+#13#10+'This includes a list of recently opened files, paths to models and materials database, etc.', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES then
begin
DeleteFile(ExpandConstant('{autoappdata}\{#MyAppName}\{code:FileConfigIni}'));
end;
end
else
begin
DeleteFile(ExpandConstant('{autoappdata}\{#MyAppName}\{code:FileConfigIni}'));
end;
end;
end;
Expand Down

0 comments on commit 9f2179b

Please sign in to comment.