Check if the application is running as administrator ealier

This commit is contained in:
Jack251970 2025-06-16 21:58:49 +08:00
parent 10567fd409
commit 4862a2d816

View file

@ -59,13 +59,6 @@ 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
{
@ -143,6 +136,13 @@ 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();