From 0b72908af13a23cfc51a15672dc7de2bbd2dabe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Sun, 11 Dec 2022 15:02:31 +0100 Subject: [PATCH] Only when not using installer we have to kill apps --- Updater/Program.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Updater/Program.cs b/Updater/Program.cs index 3fb8f58..c814d26 100644 --- a/Updater/Program.cs +++ b/Updater/Program.cs @@ -25,7 +25,7 @@ namespace Updater Instance.OnUninstall(() => { - Application_Exit(); + KillApps(); }); if (updated) @@ -62,7 +62,12 @@ namespace Updater AutoUpdater.UpdateFormSize = new Size(800, 300); AutoUpdater.ShowSkipButton = true; AutoUpdater.Synchronous = true; - AutoUpdater.ApplicationExitEvent += Application_Exit; + + if (!IsUsingInstaller) + { + // Only when not using installer we have to kill apps + AutoUpdater.ApplicationExitEvent += KillApps; + } AppendArg(UpdatedArg); TrackProcess("FanControl"); @@ -86,7 +91,7 @@ namespace Updater AppendArg(RunPrefix + processFilerName); } - private static void Application_Exit() + private static void KillApps() { ExitProcess("FanControl"); ExitProcess("PowerControl");