We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9066b10 commit 4415870Copy full SHA for 4415870
UnityLauncherPro/Tools.cs
@@ -602,9 +602,19 @@ public static void DownloadAndInstall(string url, string version)
602
}
603
604
605
- Process process = Process.Start(tempFile);
606
- process.EnableRaisingEvents = true;
607
- process.Exited += (sender, e) => DeleteTempFile(tempFile);
+ Process process;
+ // if user clicks NO to UAC, this fails (so added try-catch)
+ try
608
+ {
609
+ process = Process.Start(tempFile);
610
+ process.EnableRaisingEvents = true;
611
+ process.Exited += (sender, e) => DeleteTempFile(tempFile);
612
+ }
613
+ catch (Exception)
614
615
+ Console.WriteLine("Failed to run exe: " + tempFile);
616
+ DeleteTempFile(tempFile);
617
618
// TODO refresh upgrade dialog after installer finished
619
620
0 commit comments