Skip to content

Commit 4862a2d

Browse files
committed
Check if the application is running as administrator ealier
1 parent 10567fd commit 4862a2d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Flow.Launcher/App.xaml.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ public App()
5959
// Initialize settings
6060
_settings.WMPInstalled = WindowsMediaPlayerHelper.IsWindowsMediaPlayerInstalled();
6161

62-
// Check if the application is running as administrator
63-
if (_settings.AlwaysRunAsAdministrator && !Win32Helper.IsAdministrator())
64-
{
65-
RestartApp(true);
66-
return;
67-
}
68-
6962
// Configure the dependency injection container
7063
try
7164
{
@@ -143,6 +136,13 @@ public static void Main()
143136
return;
144137
}
145138

139+
// Check if the application is running as administrator
140+
if (_settings.AlwaysRunAsAdministrator && !Win32Helper.IsAdministrator())
141+
{
142+
RestartApp(true);
143+
return;
144+
}
145+
146146
// Initialize system language before changing culture info
147147
Internationalization.InitSystemLanguageCode();
148148

0 commit comments

Comments
 (0)