Skip to content

Commit 4ab6129

Browse files
committed
add error handling in case the uninstaller breaks or the user doesn't elevate
1 parent 8a3224e commit 4ab6129

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

ReReShade/Program.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using IniParser;
2+
using System.ComponentModel;
23
using System.Diagnostics;
34

45
Console.Write("Enter the path to your FFXIV installation: ");
@@ -141,8 +142,16 @@
141142
UseShellExecute = true
142143
}
143144
};
144-
process.Start();
145-
process.WaitForExit();
145+
try
146+
{
147+
process.Start();
148+
process.WaitForExit();
149+
}
150+
catch (Win32Exception)
151+
{
152+
Console.WriteLine("Elevation / execution of GShade uninstaller failed. Uninstall GShade manually, then hit Enter to continue.");
153+
Console.ReadLine();
154+
}
146155
}
147156
else
148157
{

0 commit comments

Comments
 (0)