We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79d31e3 commit dfc7c2fCopy full SHA for dfc7c2f
src/Files.App/Helpers/Environment/ElevationHelpers.cs
@@ -22,7 +22,7 @@ public static bool IsElevationRequired(string filePath)
22
public static bool IsAppRunAsAdmin()
23
{
24
using WindowsIdentity identity = WindowsIdentity.GetCurrent();
25
- return new WindowsPrincipal(identity).IsInRole(WindowsBuiltInRole.Administrator);
+ return new WindowsPrincipal(identity).IsInRole(new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null));
26
}
27
28
-}
+}
0 commit comments