
[已解決]批處理Bcdedit沒有備份id怎么進行刪除啟動項的新問題最后由 zhoubin 于 -6-16 13:07首先感謝powerbat老大的幫忙,但是現在遇到些新問題,不好意思只能再發一帖!!!
在這個代碼中我指定了bcdedit.exe和BCD的具體路徑(由于我在寫一個安裝卸載win pe的批處理,需要指定bcdedit.exe和BCD的具體路徑)。。。現在的問題就變成了這個批處理不起作用。。。。我知道這里高手如云,所以還得麻煩高手幫我看看這個批處理,謝謝眾位高手了!!!感激不盡。。。nclick="copycode($('code0'));">復制代碼
- @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:WindowsSystem32bcdedit.exe /store C:BootBCD /v ^| findstr.exe /i identifier description') do (
- if %%a==identifier set id=%%b
- if %%b==%descri% C:WindowsSystem32bcdedit.exe /store C:BootBCD /delete !id!
- )
- goto :eof

