diff --git a/Program.cs b/Program.cs index 499f14d1..81516ce7 100644 --- a/Program.cs +++ b/Program.cs @@ -157,7 +157,7 @@ private static void Main(){ ExitCleanup(); // ProgramPath has a trailing backslash - string updaterArgs = "/SP- /SILENT /CLOSEAPPLICATIONS /UPDATEPATH=\""+ProgramPath+"\" /RUNARGS=\""+Arguments.GetCurrentForInstallerCmd()+"\""+(IsPortable ? " /PORTABLE=1" : ""); + string updaterArgs = "/SP- /SILENT /FORCECLOSEAPPLICATIONS /UPDATEPATH=\""+ProgramPath+"\" /RUNARGS=\""+Arguments.GetCurrentForInstallerCmd()+"\""+(IsPortable ? " /PORTABLE=1" : ""); bool runElevated = !IsPortable || !WindowsUtils.CheckFolderWritePermission(ProgramPath); if (WindowsUtils.OpenAssociatedProgram(mainForm.UpdateInstallerPath, updaterArgs, runElevated)){ diff --git a/bld/gen_full.iss b/bld/gen_full.iss index dbeb1fa0..bd5044ed 100644 --- a/bld/gen_full.iss +++ b/bld/gen_full.iss @@ -24,6 +24,8 @@ DefaultGroupName={#MyAppName} OutputBaseFilename={#MyAppName} VersionInfoVersion={#MyAppVersion} SetupIconFile=.\Resources\icon.ico +CloseApplicationsFilter=*.exe,*.dll,*.pak +RestartApplications=False Uninstallable=TDIsUninstallable UninstallDisplayName={#MyAppName} UninstallDisplayIcon={app}\{#MyAppExeName} diff --git a/bld/gen_port.iss b/bld/gen_port.iss index f1449d6d..56bab0ee 100644 --- a/bld/gen_port.iss +++ b/bld/gen_port.iss @@ -24,6 +24,8 @@ DefaultGroupName={#MyAppName} OutputBaseFilename={#MyAppName}.Portable VersionInfoVersion={#MyAppVersion} SetupIconFile=.\Resources\icon.ico +CloseApplicationsFilter=*.exe,*.dll,*.pak +RestartApplications=False Uninstallable=no UsePreviousAppDir=no PrivilegesRequired=lowest diff --git a/bld/gen_upd.iss b/bld/gen_upd.iss index 534f856b..bd700a5d 100644 --- a/bld/gen_upd.iss +++ b/bld/gen_upd.iss @@ -25,6 +25,8 @@ DefaultGroupName={#MyAppName} OutputBaseFilename={#MyAppName}.Update VersionInfoVersion={#MyAppVersion} SetupIconFile=.\Resources\icon.ico +CloseApplicationsFilter=*.exe,*.dll,*.pak +RestartApplications=False Uninstallable=TDIsUninstallable UninstallDisplayName={#MyAppName} UninstallDisplayIcon={app}\{#MyAppExeName} @@ -321,7 +323,7 @@ begin WizardForm.ProgressGauge.Style := npbstMarquee try - if Exec(InstallFile, '/SP- /SILENT /UPDATEPATH="'+UpdatePath+'"', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then + if Exec(InstallFile, '/SP- /SILENT /FORCECLOSEAPPLICATIONS /UPDATEPATH="'+UpdatePath+'"', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then begin if ResultCode <> 0 then begin