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:
parent
829c332e13
commit
5eef6c8196
@ -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)){
|
||||||
|
@ -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}
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user