1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-02 02:34:08 +02:00

Kill stubborn app processes when installing updates

This commit is contained in:
chylex 2018-05-06 21:18:23 +02:00
parent 829c332e13
commit 5eef6c8196
4 changed files with 8 additions and 2 deletions

View File

@ -157,7 +157,7 @@ private static void Main(){
ExitCleanup(); ExitCleanup();
// ProgramPath has a trailing backslash // 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); bool runElevated = !IsPortable || !WindowsUtils.CheckFolderWritePermission(ProgramPath);
if (WindowsUtils.OpenAssociatedProgram(mainForm.UpdateInstallerPath, updaterArgs, runElevated)){ if (WindowsUtils.OpenAssociatedProgram(mainForm.UpdateInstallerPath, updaterArgs, runElevated)){

View File

@ -24,6 +24,8 @@ DefaultGroupName={#MyAppName}
OutputBaseFilename={#MyAppName} OutputBaseFilename={#MyAppName}
VersionInfoVersion={#MyAppVersion} VersionInfoVersion={#MyAppVersion}
SetupIconFile=.\Resources\icon.ico SetupIconFile=.\Resources\icon.ico
CloseApplicationsFilter=*.exe,*.dll,*.pak
RestartApplications=False
Uninstallable=TDIsUninstallable Uninstallable=TDIsUninstallable
UninstallDisplayName={#MyAppName} UninstallDisplayName={#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName} UninstallDisplayIcon={app}\{#MyAppExeName}

View File

@ -24,6 +24,8 @@ DefaultGroupName={#MyAppName}
OutputBaseFilename={#MyAppName}.Portable OutputBaseFilename={#MyAppName}.Portable
VersionInfoVersion={#MyAppVersion} VersionInfoVersion={#MyAppVersion}
SetupIconFile=.\Resources\icon.ico SetupIconFile=.\Resources\icon.ico
CloseApplicationsFilter=*.exe,*.dll,*.pak
RestartApplications=False
Uninstallable=no Uninstallable=no
UsePreviousAppDir=no UsePreviousAppDir=no
PrivilegesRequired=lowest PrivilegesRequired=lowest

View File

@ -25,6 +25,8 @@ DefaultGroupName={#MyAppName}
OutputBaseFilename={#MyAppName}.Update OutputBaseFilename={#MyAppName}.Update
VersionInfoVersion={#MyAppVersion} VersionInfoVersion={#MyAppVersion}
SetupIconFile=.\Resources\icon.ico SetupIconFile=.\Resources\icon.ico
CloseApplicationsFilter=*.exe,*.dll,*.pak
RestartApplications=False
Uninstallable=TDIsUninstallable Uninstallable=TDIsUninstallable
UninstallDisplayName={#MyAppName} UninstallDisplayName={#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName} UninstallDisplayIcon={app}\{#MyAppExeName}
@ -321,7 +323,7 @@ begin
WizardForm.ProgressGauge.Style := npbstMarquee WizardForm.ProgressGauge.Style := npbstMarquee
try 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 begin
if ResultCode <> 0 then if ResultCode <> 0 then
begin begin