@echo off
setlocal enabledelayedexpansion
set i=0
echo.
for /f "tokens=1,* delims= " %%a in ('bcdedit /enum') do (
if "%%a"=="标识符" set id_!i!=%%b
if "%%a"=="description" (
if !i! GTR 0 echo !i!.%%b
set /a i+=1
)
)
set n=1
echo.
set /p n=请输入数字选择(默认%n%):
if not defined id_%n% goto:eof
bcdedit /bootsequence !id_%n%!
shutdown /r /t 0