Skip to content

Commit

Permalink
"fix" reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaProductions committed Aug 12, 2024
1 parent f3ad21d commit 72c255e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Rectify11Installer/Pages/ProgressPage.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Rectify11Installer.Core;
using Rectify11Installer.Win32;
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
Expand Down Expand Up @@ -253,7 +254,15 @@ private void RestartRoutine()
Variables.IsUninstall = true;
if (r1.Checked)
{
NativeMethods.Reboot();
try
{
NativeMethods.Reboot();
}
catch(Exception ex)
{
Logger.Warn("Reboot failed. " + ex.ToString());
Process.Start("shutdown", "/r /t 0").WaitForExit();
}
}
else if (r2.Checked)
Application.Exit();
Expand Down

0 comments on commit 72c255e

Please sign in to comment.