diff --git a/Program.cs b/Program.cs index 725bc7d..5ac596c 100644 --- a/Program.cs +++ b/Program.cs @@ -48,7 +48,6 @@ namespace Click_to_Call_Tray _hotkeyManager.HotkeyPressed += OnHotkeyPressed; var currentTag = UpdateCheck.GetCurrentVersion(); - // Optional: asynchronous update check Task.Run(() => UpdateCheck.CheckUpdate()); ApplicationConfiguration.Initialize(); diff --git a/UpdateCheck.cs b/UpdateCheck.cs index 3166fa8..000c729 100644 --- a/UpdateCheck.cs +++ b/UpdateCheck.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Net.Http; using System.Text; @@ -57,7 +58,13 @@ namespace Click_to_Call_Tray "Click-to-Call-Tray Updater", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { - System.Diagnostics.Process.Start("https://git.jan.sx/krjan02/Click-to-Call-Tray/releases/latest"); + var ps = new ProcessStartInfo("https://git.jan.sx/krjan02/Click-to-Call-Tray/releases/latest") + { + UseShellExecute = true, + Verb = "open" + }; + Process.Start(ps); + Application.Exit(); } return true; }