From dfb3bdfdc05e43d788cc32060cd9caca94fc4012 Mon Sep 17 00:00:00 2001 From: Mattias Gustavsson Date: Thu, 5 Nov 2020 15:23:35 +0100 Subject: [PATCH] SDA-2651 Added second termination step --- installer/win/WixSharpInstaller/Symphony.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/installer/win/WixSharpInstaller/Symphony.cs b/installer/win/WixSharpInstaller/Symphony.cs index 8b322c50..cb931864 100644 --- a/installer/win/WixSharpInstaller/Symphony.cs +++ b/installer/win/WixSharpInstaller/Symphony.cs @@ -249,6 +249,24 @@ class Script } } }); + + // When force terminating Symphony, sometimes this is detected as the renderer process crashing. + // As this message would confuse users, we wait a short time and then kill all Symphony instances + // again, which would ensure that the dialog about renderer crash will not be shown. + + System.Threading.Thread.Sleep(500); + + // Try to close all running symphony instances again + System.Diagnostics.Process.GetProcessesByName("Symphony").ForEach(p => { + if( System.IO.Path.GetFileName(p.MainModule.FileName) =="Symphony.exe") + { + if( !p.HasExited ) + { + p.Kill(); + p.WaitForExit(); + } + } + }); } catch (System.ComponentModel.Win32Exception ex) {