private Boolean CreateUEFIBootOption(String Drive)
{
String _Drive = String.Format(@"\\.\{0}", Drive);
Log.write("-Add UEFI Entry");
if (!UEFIWrapper.UEFI_Init())
{
Log.write("UEFI Init Fail");
return(false);
}
if (Environment.Is64BitOperatingSystem)
{
if (!UEFIWrapper.UEFI_MakeMediaBootOption(config.BOOT_ENTRY_TEXT, _Drive, config.UEFI_DIR + config.UEFI_GRUB_BIN64))
{
Log.write("UEFI 64-bit Entry Fail");
return(false);
}
}
else
{
if (!UEFIWrapper.UEFI_MakeMediaBootOption(config.BOOT_ENTRY_TEXT, _Drive, config.UEFI_DIR + config.UEFI_GRUB_BIN32))
{
Log.write("UEFI 32-bit Entry Fail");
return(false);
}
}
return(true);
}