From dd0899f69af05ff1d70c52e627750c0b07cf87e7 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Fri, 13 Jun 2025 17:39:21 +0800 Subject: [PATCH] Check always running as administrator --- Flow.Launcher/App.xaml.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 631b98cf1..23dbb1b40 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -71,6 +71,13 @@ namespace Flow.Launcher return; } + // Check if the application is running as administrator + if (_settings.AlwaysRunAsAdministrator && !Win32Helper.IsAdministrator()) + { + RestartApp(true); + return; + } + // Configure the dependency injection container try {