|
|
本帖最后由 zhoubin 于 2012-6-16 13:07 编辑
首先感谢powerbat老大的帮忙,但是现在遇到些新问题,不好意思只能再发一帖!!!- @echo off
- set descri="Start Windows XP PE" && call :delid
- set descri="Start 32Bit Windows7 PE" && call :delid
- set descri="Start 64Bit Windows7 PE" && call :delid
- set descri="Start Grub4DOS" && call :delid
- endlocal
- goto :eof
- :delid
- setlocal enableDelayedExpansion
- for /f "tokens=1*" %%a in ('C:\Windows\System32\bcdedit.exe /store C:\Boot\BCD /v ^| findstr.exe /i "identifier description"') do (
- if "%%a"=="identifier" set id=%%b
- if "%%b"==%descri% C:\Windows\System32\bcdedit.exe /store C:\Boot\BCD /delete !id!
- )
- goto :eof
复制代码 在这个代码中我指定了bcdedit.exe和BCD的具体路径(由于我在写一个安装卸载win pe的批处理,需要指定bcdedit.exe和BCD的具体路径)。。。
现在的问题就变成了这个批处理不起作用。。。。
我知道这里高手如云,所以还得麻烦高手帮我看看这个批处理,谢谢众位高手了!!!感激不尽。。。 |
评分
-
查看全部评分
|