use crate::share::exec;
pub fn is_admin() -> bool {
let shell = "[bool]([System.Security.Principal.WindowsPrincipal][System.Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)";
let output = exec(shell).expect("Failed to execute powershell command");
String::from_utf8(output.stdout).unwrap_or_default().trim() == "True"
}