Computer system there are two ways to get the boot, the first is the MBR mode, to end the way, the other is a UEFI start way, now popular way,
Function ExecAppWait () refer to the website for https://blog.csdn.net/wlanye/article/details/51744511
Procedure TForm1. Btn1Click (Sender: TObject);//note: this is the MBR mode
The begin
ExecAppWait (' BCD. BAT ');//success
{BCD. BAT file content is as follows:
C: \ Windows \ system32 \ bcdboot exe c: \ Windows/c: L useful - cn}
Refer to http://blog.sina.com.cn/s/blog_858a1fc70106nrb4.html
end;
Procedure TForm1. Btn2Click (Sender: TObject);//(note: this is UEFI mode)
The begin
ExecAppWait (' UEFI. BAT ');//the picture a flash, you don't succeed, F dish is still empty, but on the hard drive double-click UEFI. BAT file is a success, according to! ;
{UEFI. Bat content is as follows:
C: \ Windows \ system32 \ bcdboot exe c: \ Windows/s: F/F uefi/l useful -
}
//reference document https://www.cnblogs.com/devilloki/p/5651478.html
//bcdboot c: \ Windows/s m: uefi/f/l useful - cn
end;
Have been used in the program set up default_app. The manifest file, its content is as follows:
<? The XML version="1.0" encoding="utf-8" standalone="yes"?>
Name="HTTP://Microsoft.Windows.Com mon - Controls,"
Version="6.0.0.0"
B64144ccf1df publicKeyToken="6595", "
Language='*'
ProcessorArchitecture="*"/& gt;
UiAccess="false"/& gt;