mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
20 lines
491 B
C#
20 lines
491 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Runtime.Versioning;
|
|
using System.Security.Principal;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Remotely.Shared.Services;
|
|
|
|
[SupportedOSPlatform("windows")]
|
|
public class ElevationDetectorWin : IElevationDetector
|
|
{
|
|
public bool IsElevated()
|
|
{
|
|
return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
|
|
}
|
|
}
|