From 4416efece8c273afc5b8a86fa22220b5cc9c823c Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Mon, 16 Jun 2025 22:53:35 +0800 Subject: [PATCH] Revert "Check if the application is running as administrator ealier" This reverts commit 4862a2d8163c821fe16a05a465576c9b80b78b4e. --- Flow.Launcher/App.xaml.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Flow.Launcher/App.xaml.cs b/Flow.Launcher/App.xaml.cs index 5ce2580de..5d5f3dd35 100644 --- a/Flow.Launcher/App.xaml.cs +++ b/Flow.Launcher/App.xaml.cs @@ -59,6 +59,13 @@ namespace Flow.Launcher // Initialize settings _settings.WMPInstalled = WindowsMediaPlayerHelper.IsWindowsMediaPlayerInstalled(); + // Check if the application is running as administrator + if (_settings.AlwaysRunAsAdministrator && !Win32Helper.IsAdministrator()) + { + RestartApp(true); + return; + } + // Configure the dependency injection container try { @@ -136,13 +143,6 @@ namespace Flow.Launcher return; } - // Check if the application is running as administrator - if (_settings.AlwaysRunAsAdministrator && !Win32Helper.IsAdministrator()) - { - RestartApp(true); - return; - } - // Initialize system language before changing culture info Internationalization.InitSystemLanguageCode();