没做测试- @echo off & setlocal enabledelayedexpansion
- :top
- cls & echo,1.删除 BOOTMGR BCD 启动项目
- echo,2.修改 description
- set /p choice=选择[1-2]:
- echo,%choice%|findstr "^[1-2]$" || goto :top
- :st
- cls & set "n="
- for /f "tokens=1*" %%a in ('bcdedit /v') do (
- if "%%a"=="标识符" (
- set /a n+=1
- echo,---!n!------------------------------------------------
- set "ID!n!=%%b" & echo, ID: %%b
- )
- if /i "%%a"=="description" echo,说明: %%b
- if /i "%%a"=="device" echo,设备: %%b
- )
- echo,---End----------------------------------------------
-
- echo,&echo,选择一个项目编号并回车确认[1-%n%]:
- set /p p=
- if not defined ID%p% goto :st
- if "%choice%"=="1" (
- bcdedit /delete !ID%p%!
- ) else (
- set /p p1=输入修改后的 description :
- bcdedit /set !ID%p%! description "!p1!"
- )
- pause
复制代码
|