Skip to content

Commit 163b35d

Browse files
committed
Advanced Settings Plugin downloader fixes
1 parent 325c6ff commit 163b35d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/Helpers/ProcessHelper.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ public static bool IsUserAdministrator()
3737
return principal.IsInRole(WindowsBuiltInRole.Administrator);
3838
}
3939

40-
public static void RunAsAdmin(string? param = null)
40+
public static void RunAsAdmin(string? param = null, bool force = false)
4141
{
4242

4343
if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAdmin) < 2000) return;
4444
lastAdmin = DateTimeOffset.Now.ToUnixTimeMilliseconds();
4545

4646
// Check if the current user is an administrator
47-
if (!IsUserAdministrator())
47+
if (!IsUserAdministrator() || force)
4848
{
4949
ProcessStartInfo startInfo = new ProcessStartInfo();
5050
startInfo.UseShellExecute = true;

app/Ryzen/RyzenControl.cs

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ public static void DownloadRing()
185185
{
186186
System.IO.Compression.ZipFile.ExtractToDirectory(zipLocation, exeDir, overwriteFiles: true);
187187
File.Delete(zipLocation);
188+
ProcessHelper.RunAsAdmin("uv", true);
188189
}
189190
catch (Exception ex)
190191
{

0 commit comments

Comments
 (0)