From d2ec7b4836add82510b78445a4737a21980f75ac Mon Sep 17 00:00:00 2001 From: Darren Reid Date: Thu, 14 Apr 2016 15:39:47 +1000 Subject: [PATCH] Redundant kill all processes Being called before `ApplyReleasesImpl.FullUninstall` --- src/Squirrel/UpdateManager.ApplyReleases.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/Squirrel/UpdateManager.ApplyReleases.cs b/src/Squirrel/UpdateManager.ApplyReleases.cs index 3520589d2..6af408684 100644 --- a/src/Squirrel/UpdateManager.ApplyReleases.cs +++ b/src/Squirrel/UpdateManager.ApplyReleases.cs @@ -122,17 +122,6 @@ await squirrelAwareApps.ForEachAsync(async exe => { } else { allApps.ForEach(x => RemoveShortcutsForExecutable(x.Name, ShortcutLocation.StartMenu | ShortcutLocation.Desktop)); } - - // NB: Some people attempt to uninstall apps while - // they're still running. I cannot even. - var toKill = allApps - .SelectMany(x => Process.GetProcessesByName(x.Name.Replace(".exe", ""))) - .ToList(); - - if (toKill.Count > 0) { - toKill.ForEach(x => x.Kill()); - Thread.Sleep(750); - } } catch (Exception ex) { this.Log().WarnException("Failed to run pre-uninstall hooks, uninstalling anyways", ex); }