From a34c8c7cff0b43818a14fbbee39432e4d267eeec Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Thu, 28 Feb 2013 12:27:49 -0500 Subject: [PATCH] Playing nice doesn't work - kill MBT --- MediaBrowser.Installer/MainWindow.xaml.cs | 6 ++++-- MediaBrowser.Installer/MediaBrowser.Installer.csproj | 2 +- MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/MediaBrowser.Installer/MainWindow.xaml.cs b/MediaBrowser.Installer/MainWindow.xaml.cs index 58d1d11ac..abcf3a169 100644 --- a/MediaBrowser.Installer/MainWindow.xaml.cs +++ b/MediaBrowser.Installer/MainWindow.xaml.cs @@ -112,11 +112,11 @@ namespace MediaBrowser.Installer // Determine Package version var version = await GetPackageVersion(); - lblStatus.Content = string.Format("Downloading {0} (version {1})...", FriendlyName, version.versionStr); // Now try and shut down the server if that is what we are installing and it is running if (PackageName == "MBServer" && Process.GetProcessesByName("mediabrowser.serverapplication").Length != 0) { + lblStatus.Content = "Shutting Down Media Browser Server..."; using (var client = new WebClient()) { try @@ -139,9 +139,10 @@ namespace MediaBrowser.Installer var processes = Process.GetProcessesByName("mediabrowser.ui"); if (processes.Length > 0) { + lblStatus.Content = "Shutting Down Media Browser Theater..."; try { - processes[0].CloseMainWindow(); + processes[0].Kill(); } catch (Exception ex) { @@ -153,6 +154,7 @@ namespace MediaBrowser.Installer } // Download + lblStatus.Content = string.Format("Downloading {0} (version {1})...", FriendlyName, version.versionStr); var archive = await DownloadPackage(version); dlAnimation.StopAnimation(); prgProgress.Visibility = btnCancel.Visibility = Visibility.Hidden; diff --git a/MediaBrowser.Installer/MediaBrowser.Installer.csproj b/MediaBrowser.Installer/MediaBrowser.Installer.csproj index 0fcb05202..bc9a53936 100644 --- a/MediaBrowser.Installer/MediaBrowser.Installer.csproj +++ b/MediaBrowser.Installer/MediaBrowser.Installer.csproj @@ -29,7 +29,7 @@ Media Browser Team Media Browser false - 23 + 25 0.1.1.%2a false true diff --git a/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs b/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs index 28eded0b9..934ff284b 100644 --- a/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs +++ b/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs @@ -83,7 +83,7 @@ namespace MediaBrowser.Uninstaller.Execute { using (var client = new WebClient()) { - lblHeading.Content = "Shutting Down Server..."; + lblHeading.Content = "Shutting Down Media Browser Server..."; try { client.UploadString("http://localhost:8096/mediabrowser/system/shutdown", ""); @@ -104,9 +104,10 @@ namespace MediaBrowser.Uninstaller.Execute var processes = Process.GetProcessesByName("mediabrowser.ui"); if (processes.Length > 0) { + lblHeading.Content = "Shutting Down Media Browser Theater..."; try { - processes[0].CloseMainWindow(); + processes[0].Kill(); } catch (Exception ex) {