mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 13:05:38 +02:00
#369, fix crash on windows 11 when launching webpage
This commit is contained in:
parent
4998a104ea
commit
9e85ee5810
1 changed files with 10 additions and 1 deletions
|
@ -252,7 +252,16 @@ namespace PersistentWindows.SystrayShell
|
|||
|
||||
if (!upgradeDownloaded.ContainsKey(latestVersion))
|
||||
{
|
||||
Process.Start(Program.ProjectUrl + "/releases");
|
||||
string url = Program.ProjectUrl + "/releases";
|
||||
var os_version = Environment.OSVersion;
|
||||
if (os_version.Version.Major < 10)
|
||||
Process.Start(url);
|
||||
else if (os_version.Version.Build < 22000)
|
||||
Process.Start(url);
|
||||
/* windows 11
|
||||
else
|
||||
Process.Start(new ProcessStartInfo(url));
|
||||
*/
|
||||
|
||||
var src_file = $"{Program.ProjectUrl}/releases/download/{latestVersion}/{System.Windows.Forms.Application.ProductName}{latestVersion}.zip";
|
||||
var dst_file = $"{Program.AppdataFolder}/upgrade.zip";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue