Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions installer/common.iss
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,26 @@ begin
end;
end;

function StopRunningSyncTrayzorProcesses(): Boolean;
var
ResultCode: Integer;
begin
Result := True;

if not Exec(ExpandConstant('{sys}\taskkill.exe'), '/IM SyncTrayzor.exe /F /T', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
begin
Log('Failed to launch taskkill for SyncTrayzor.exe processes; continuing setup');
end
else if ResultCode = 0 then
begin
Log('Requested termination of SyncTrayzor.exe processes');
end
else
begin
Log('taskkill exited with code ' + IntToStr(ResultCode) + '; continuing setup');
end;
end;

procedure RestoreAutostartRegistry();
var
NewValue: string;
Expand Down Expand Up @@ -399,6 +419,8 @@ end;
function InitializeSetup(): Boolean;
begin
Result := True;
StopRunningSyncTrayzorProcesses();

if not EnsureNoLegacyX86() then
begin
Result := False;
Expand Down
Loading