|
:un_bcd
set vid=
set timeout=5
set gname=优元素PE启动盘
set gname2=\chxm
type temp_bcd.txt | find "%gname2%" >nul && goto un_bcd_1
bcdedit /create /d "%gname%" /application bootsector >vid.ini
:un_bcd_1
for /f "tokens=1 delims=:" %%i In ('findstr /n %gname2% temp_bcd.txt') Do (
Set nid=%%i
)
set /a nid=%nid%-3
for /f "skip=%nid% tokens=2" %%i in (temp_bcd.txt) do set vid=%%i&goto un_bcd_2
:un_bcd_2
bcdedit /delete %vid% /cleanup >nul
bcdedit /timeout %timeout% >nul
bcdedit >temp_bcd.txt
type temp_bcd.txt | find "%gname2%" >nul && goto un_bcd_1
goto end
:end
del temp_bcd.txt >nul 2>nul
del vid.ini >nul 2>nul
Exit |
|