Advanced Settings Plugin downloader tweaks

This commit is contained in:
Serge
2024-01-26 18:10:11 +01:00
parent 7b34ec4a8c
commit 325c6ff3ea
2 changed files with 5 additions and 3 deletions

View File

@@ -15,7 +15,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly> <ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.150</AssemblyVersion> <AssemblyVersion>0.149</AssemblyVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -7,6 +7,7 @@
using GHelper.Helpers; using GHelper.Helpers;
using System.Management; using System.Management;
using System.Net; using System.Net;
using System.Reflection;
namespace Ryzen namespace Ryzen
{ {
@@ -153,7 +154,8 @@ namespace Ryzen
public static void DownloadRing() public static void DownloadRing()
{ {
string requestUri = "https://github.com/seerge/g-helper/releases/latest/download/PluginAdvancedSettings.zip"; var appVersion = new Version(Assembly.GetExecutingAssembly().GetName().Version.ToString());
string requestUri = "https://github.com/seerge/g-helper/releases/download/v" + appVersion.Major + "." + appVersion.Minor + "/PluginAdvancedSettings.zip";
Uri uri = new Uri(requestUri); Uri uri = new Uri(requestUri);
@@ -175,7 +177,7 @@ namespace Ryzen
{ {
Logger.WriteLine(ex.Message); Logger.WriteLine(ex.Message);
Logger.WriteLine(ex.ToString()); Logger.WriteLine(ex.ToString());
if (!ProcessHelper.IsUserAdministrator()) ProcessHelper.RunAsAdmin("uv"); if (!ProcessHelper.IsUserAdministrator() && !ex.Message.Contains("remote server")) ProcessHelper.RunAsAdmin("uv");
return; return;
} }