From 9f2179b5d6277561d047f9665217e3d6c261f40e Mon Sep 17 00:00:00 2001 From: Vasyl Skorych Date: Sun, 14 Jul 2024 23:29:13 +0200 Subject: [PATCH] build: Add option to skip uninstaller question --- DyssolInstallers/Scripts/Main.iss | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/DyssolInstallers/Scripts/Main.iss b/DyssolInstallers/Scripts/Main.iss index 6e60fc2e..3c55802d 100644 --- a/DyssolInstallers/Scripts/Main.iss +++ b/DyssolInstallers/Scripts/Main.iss @@ -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;