From 93fc295bf2c1fbff09f3806e463472d3dc970624 Mon Sep 17 00:00:00 2001 From: Terry MacDonald Date: Mon, 28 Dec 2020 23:17:13 +1300 Subject: [PATCH] Fixing automatic admin version upgrade Upgrade processs wasn't upgrading using elevated privileges. Appears to be doing so now. --- DisplayMagician/Program.cs | 2 +- DisplayMagician/UIForms/MainForm.cs | 2 + .../DisplayMagicianSetup.wixproj | 2 +- .../DisplayMagicianFilesFragment.wxs | 110 +++++++++--------- docs/update/index.json | 2 +- 5 files changed, 60 insertions(+), 58 deletions(-) diff --git a/DisplayMagician/Program.cs b/DisplayMagician/Program.cs index 2089b8d..2700d58 100644 --- a/DisplayMagician/Program.cs +++ b/DisplayMagician/Program.cs @@ -362,7 +362,7 @@ namespace DisplayMagician { catch (Exception ex) { Console.WriteLine($"Program/StartUpNormally exception 3: {ex.Message}: {ex.StackTrace} - {ex.InnerException}"); - logger.Error(ex, $"Program/StartUpNormally top level exception"); + logger.Error(ex, $"Program/StartUpNormally top level exception: {ex.Message}: {ex.StackTrace} - {ex.InnerException}"); MessageBox.Show( ex.Message, Language.Fatal_Error, diff --git a/DisplayMagician/UIForms/MainForm.cs b/DisplayMagician/UIForms/MainForm.cs index 21c4ad9..2572cb2 100644 --- a/DisplayMagician/UIForms/MainForm.cs +++ b/DisplayMagician/UIForms/MainForm.cs @@ -179,6 +179,8 @@ namespace DisplayMagician.UIForms //Run the AutoUpdater to see if there are any updates available. AutoUpdater.CheckForUpdateEvent += AutoUpdaterOnCheckForUpdateEvent; AutoUpdater.ParseUpdateInfoEvent += AutoUpdaterOnParseUpdateInfoEvent; + AutoUpdater.RunUpdateAsAdmin = true; + AutoUpdater.HttpUserAgent = "DisplayMagician AutoUpdater"; AutoUpdater.Start("http://displaymagician.littlebitbig.com/update/"); } diff --git a/DisplayMagicianSetup/DisplayMagicianSetup.wixproj b/DisplayMagicianSetup/DisplayMagicianSetup.wixproj index 61a16d2..c913b7e 100644 --- a/DisplayMagicianSetup/DisplayMagicianSetup.wixproj +++ b/DisplayMagicianSetup/DisplayMagicianSetup.wixproj @@ -122,7 +122,7 @@ - "$(WIX)bin\heat.exe" dir H:\vscode-projects\DisplayMagician\DisplayMagician\bin\Debug -cg DisplayMagicianFiles -gg -scom -sreg -sfrag -srd -dr APPLICATIONROOTDIRECTORY -var var.DisplayMagicianFilesDir -out "$(ProjectDir)Fragments\DisplayMagicianFilesFragment.wxs" + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -225,8 +225,8 @@ - - + diff --git a/docs/update/index.json b/docs/update/index.json index e7412b7..73f7f7e 100644 --- a/docs/update/index.json +++ b/docs/update/index.json @@ -8,7 +8,7 @@ "mode": 0 }, "checksum": { - "value": "E8CC37A0E526028EB22C438282FDAE4BA6F9ECA6F7C3093AD03338E72FE04261", + "value": "D229B8E97A7490725383811C1C74B0D0A4AE2AD9781A49C3ADE61D3E9C37BBAD", "hashingAlgorithm": "SHA256" } } \ No newline at end of file