mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-22 18:15:47 +02:00
Kill stubborn app processes when installing updates
This commit is contained in:
parent
829c332e13
commit
5eef6c8196
@ -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)){
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user