The Free Software Media System - Server Backend & API
Attempt to create Uninstall reg key if not there
Eric Reedd05f4d71d2c2
diff --git a/MediaBrowser.Installer/MainWindow.xaml.cs b/MediaBrowser.Installer/MainWindow.xaml.csindex a7f6f5b346..0a30cc6a26 100644--- a/MediaBrowser.Installer/MainWindow.xaml.cs+++ b/MediaBrowser.Installer/MainWindow.xaml.cs@@ -475,13 +475,22 @@ namespace MediaBrowser.Installer/// <param name="targetExe"></param>private void CreateUninstaller(string uninstallPath, string targetExe){- using (var parent = Registry.CurrentUser.OpenSubKey(- @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", true))+ var parent = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", true);{if (parent == null){- MessageBox.Show("Uninstall registry key not found.");- return;+ var rootParent = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion", true);+ {+ if (rootParent != null)+ {+ parent = rootParent.CreateSubKey("Uninstall");+ if (parent == null)+ {+ MessageBox.Show("Unable to create Uninstall registry key. Program is still installed sucessfully.");+ return;+ }+ }+ }}try{@@ -495,7 +504,7 @@ namespace MediaBrowser.Installerif (key == null){- MessageBox.Show(String.Format("Unable to create uninstaller entry'{0}\\{1}'", @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", guidText));+ MessageBox.Show(String.Format("Unable to create uninstaller entry'{0}\\{1}'. Program is still installed successfully.", @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", guidText));return;}diff --git a/MediaBrowser.Installer/MediaBrowser.Installer.csproj b/MediaBrowser.Installer/MediaBrowser.Installer.csprojindex eccada0f53..8683833ab5 100644--- a/MediaBrowser.Installer/MediaBrowser.Installer.csproj+++ b/MediaBrowser.Installer/MediaBrowser.Installer.csproj@@ -31,7 +31,7 @@<PublisherName>Media Browser Team</PublisherName><SuiteName>Media Browser</SuiteName><OpenBrowserOnPublish>false</OpenBrowserOnPublish>- <ApplicationRevision>55</ApplicationRevision>+ <ApplicationRevision>57</ApplicationRevision><ApplicationVersion>0.1.1.%2a</ApplicationVersion><UseApplicationTrust>false</UseApplicationTrust><PublishWizardCompleted>true</PublishWizardCompleted>