aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2013-03-12 14:56:46 -0400
committerEric Reed <ebr@mediabrowser3.com>2013-03-12 14:56:46 -0400
commit36e4e8f40235d51c71261585d29d82d9e8ed27c1 (patch)
tree6d91004195e46be4bcc7e3073e34b0af5f11939e
parent9fa31ff04b49bc2dbf32db3df1935229830db55a (diff)
Add pismo to installer and uninstaller
-rw-r--r--MediaBrowser.Installer/MainWindow.xaml.cs22
-rw-r--r--MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs21
2 files changed, 43 insertions, 0 deletions
diff --git a/MediaBrowser.Installer/MainWindow.xaml.cs b/MediaBrowser.Installer/MainWindow.xaml.cs
index 22548a355..eddfdccc7 100644
--- a/MediaBrowser.Installer/MainWindow.xaml.cs
+++ b/MediaBrowser.Installer/MainWindow.xaml.cs
@@ -249,6 +249,17 @@ namespace MediaBrowser.Installer
return;
}
+ // Install Pismo
+ try
+ {
+ InstallPismo();
+ }
+ catch (Exception e)
+ {
+ SystemClose("Error Installing Pismo - "+e.GetType().FullName+"\n\n"+e.Message);
+ return;
+ }
+
// And run
try
{
@@ -264,6 +275,17 @@ namespace MediaBrowser.Installer
}
+ private void InstallPismo()
+ {
+ // Kick off the Pismo installer and wait for it to end
+ var pismo = new Process();
+ pismo.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
+ pismo.StartInfo.FileName = Path.Combine(RootPath, "Pismo", "pfminst.exe");
+ pismo.StartInfo.Arguments = "install";
+ pismo.Start();
+ pismo.WaitForExit();
+ }
+
protected async Task<PackageVersionInfo> GetPackageVersion()
{
try
diff --git a/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs b/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs
index 5cbd2dd9e..5870a8ed5 100644
--- a/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs
+++ b/MediaBrowser.Uninstaller.Execute/MainWindow.xaml.cs
@@ -198,12 +198,33 @@ namespace MediaBrowser.Uninstaller.Execute
// Remove reference to us
RemoveUninstall();
+ // Remove pismo
+ try
+ {
+ UnInstallPismo();
+ }
+ catch
+ {
+ // No biggie - maybe they uninstalled it themselves
+ }
+
// and done
lblHeading.Content = string.Format("Media Browser {0} Uninstalled.", Product);
btnUninstall.Visibility = Visibility.Hidden;
btnFinished.Visibility = Visibility.Visible;
}
+ private void UnInstallPismo()
+ {
+ // Kick off the Pismo uninstaller and wait for it to end
+ var pismo = new Process();
+ pismo.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
+ pismo.StartInfo.FileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "pfm.exe");
+ pismo.StartInfo.Arguments = "uninstall pfm-license-mediabrowser.txt";
+ pismo.Start();
+ pismo.WaitForExit();
+ }
+
private void RemoveUninstall()
{