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();