diff --git a/README.md b/README.md index 1dcf4e4..2148005 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,10 @@ If you copy an image file to ESP manually, note that the image must be a 24-bit ## Troubleshooting +### BCDEdit failed + +You can first try the other installation option in the menu. If it doesn't work either, your computer might have a problem. Open Command Prompt and figure out why `bcdedit /enum firmware` fails. In some cases, disabling antivirus, checking the hard disk or searching for 'how to fix 0x800703EE' may help. + ### Verification failed, Security violation This is part of the setup on first boot. Make sure you have read and understood [shim.md](shim.md). diff --git a/src/Setup.cs b/src/Setup.cs index 1766c57..cc5469e 100644 --- a/src/Setup.cs +++ b/src/Setup.cs @@ -455,12 +455,12 @@ public class Setup { } var bcdeditEnum = Execute("bcdedit", "/enum firmware"); if (bcdeditEnum.ExitCode != 0) { - WriteLine("BCDEdit is not working. Fix it or try another method."); if (bcdeditEnum.Output != null) { - var lastLine = bcdeditEnum.Output.Split("\n".ToCharArray()).Last(); - WriteLine($"BCDEdit output: {lastLine}"); - WriteLine("Disable antivirus, check your hard disk, or search 'how to fix 0x800703EE'."); + var lines = bcdeditEnum.Output.Split("\n".ToCharArray()); + var lastLine = lines.Select(s => s != "").Last(); + WriteLine($"BCDEdit failed with: {lastLine}"); } + WriteLine("BCDEdit failed. See README for further information."); throw new SetupException("Failed to enable HackBGRT with BCDEdit!"); } try {