diff options
Diffstat (limited to 'MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs')
| -rw-r--r-- | MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs b/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs index 9906af273..28eded0b9 100644 --- a/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs +++ b/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs @@ -98,6 +98,22 @@ namespace MediaBrowser.Uninstaller.Execute } } } + else + { + // Installing MBT - shut it down if it is running + var processes = Process.GetProcessesByName("mediabrowser.ui"); + if (processes.Length > 0) + { + try + { + processes[0].CloseMainWindow(); + } + catch (Exception ex) + { + MessageBox.Show("Unable to shutdown Media Browser Theater. Please ensure it is not running before hitting OK.\n\n" + ex.Message, "Error"); + } + } + } // if the startmenu item is empty now - delete it too if (Directory.GetFiles(startMenu).Length == 0) { |
