bcdedit需要有中文语言文件
---------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
@echo off
cd /d %~dp0
rem 获取--Pe--启动项的标识(identifier)
for /F "usebackq tokens=1,*" %%I IN (`bcdedit /enum^|findstr /I "标识符 identifier"`) DO (for /F "usebackq" %%A IN (`bcdedit /enum %%J^|findstr /I ".wim,"`) DO (set p=%%J))
rem 获取--Grub4dos实模式启动扇区--启动项的标识(identifier)
for /F "usebackq tokens=1,*" %%I IN (`bcdedit /enum all^|findstr /I "标识符 identifier"`) DO (for /F "usebackq" %%A IN (`bcdedit /enum %%J^|findstr /I "实模式启动扇区 Real-mode"`) DO (set g=%%J))
rem 获取--Winre修复计算机--启动项的标识(identifier)
for /F "usebackq tokens=1,*" %%I IN (`bcdedit /enum all^|findstr /I "标识符 identifier"`) DO (for /F "usebackq" %%A IN (`bcdedit /enum %%J^|findstr /I "Winre.wim"`) DO (set r=%%J))