diff --git a/v2rayN/ServiceLib/Common/Utils.cs b/v2rayN/ServiceLib/Common/Utils.cs index 4d4665eabc6..3aec2a9b52a 100644 --- a/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayN/ServiceLib/Common/Utils.cs @@ -860,18 +860,19 @@ public static bool IsAdministrator() { return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator); } - else - { - var id = GetLinuxUserId().Result ?? "1000"; - if (int.TryParse(id, out var userId)) - { - return userId == 0; - } - else - { - return false; - } - } + return false; + //else + //{ + // var id = GetLinuxUserId().Result ?? "1000"; + // if (int.TryParse(id, out var userId)) + // { + // return userId == 0; + // } + // else + // { + // return false; + // } + //} } private static async Task GetLinuxUserId() diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs index 79f4eea801e..52c0fdc9ec2 100644 --- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs @@ -134,7 +134,7 @@ public MainWindow() } }); - this.Title = $"{Utils.GetVersion()} - {(AppHandler.Instance.IsAdministrator ? ResUI.RunAsAdmin : ResUI.NotRunAsAdmin)}"; + this.Title = $"{Utils.GetVersion()}"; if (Utils.IsWindows()) { ThreadPool.RegisterWaitForSingleObject(Program.ProgramStarted, OnProgramStarted, null, -1, false);