improve:UIA置顶

This commit is contained in:
2026-04-30 22:59:19 +08:00
parent b614517728
commit a7b020b0ff
2 changed files with 122 additions and 0 deletions
+7
View File
@@ -39,6 +39,13 @@ namespace Ink_Canvas.Helpers
}
else
{
// 当前已是管理员时,直接通过用户令牌降权启动,避免经由 explorer 中转的延迟
if (IsRunningAsAdmin() && UIAccessHelper.RestartAsNormalUser())
{
Application.Current.Shutdown();
return;
}
Process.Start("explorer.exe", "\"" + exePath + "\"");
}