Update Updater, Configuration

Update MainForm Binding Servers,Modes
This commit is contained in:
ChsBuffer
2021-06-05 18:37:12 +08:00
parent 34acb6b281
commit 8a48e321b5
11 changed files with 115 additions and 135 deletions

View File

@@ -1,9 +1,11 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Management;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Threading.Tasks;
using Netch.Models;
using Vanara.PInvoke;
@@ -47,7 +49,11 @@ namespace Netch.Utils
if (metric != null)
arguments += $"metric={metric} ";
Utils.ProcessRunHiddenAsync("netsh", arguments).Wait();
Process.Start(new ProcessStartInfo("netsh.exe", arguments)
{
UseShellExecute = false,
Verb = "runas"
})!.WaitForExit();
}
}