rem 首先 还原BCD
bcdedit /import %SYSTEMDRIVE%\BOOT\QQBCD\BCD.
@echo off
bcdedit>.\tempd.ini
for /f "tokens=1* delims= " %%a in (tempd.ini) do (
set "%%a=%%b"
if "%%b"=="你好 GHOST 我爱你" goto loop
)
:loop
echo %标识符%>.\idt.ini
del /f /q .\tempd.ini
for /f %%i in (.\idt.ini) do set TID=%%i
start /min bcdedit /delete %TID%
del /f /q .\idt.ini
SET TP=%~dp0
SET TP=%TP:~0,-1%
SET BAKPATH=%SYSTEMDRIVE%\BOOT\BCDBAK.BAK
SET INFO=你好 GHOST 我爱你
SET MBRP=\yybot.mbr
set timeout=6
for /f %%i in (%SYSTEMDRIVE%\BOOT\Deadlyid.ini) do set CID=%%i
bcdedit /delete %CID%
rem 开始写入
IF NOT EXIST "%BAKPATH%" start /wait bcdedit.exe /export "%BAKPATH%"
for /f "tokens=2 delims={}" %%i in ('bcdedit.exe /create /d "%INFO%" /application bootsector') do SET CLASSID=%%i
rem IF "%CLASSID%"=="" GOTO createerr
SET CLASSID={%CLASSID%}
ECHO %CLASSID%>%SYSTEMDRIVE%\BOOT\Deadlyid.ini
bcdedit.exe /set %CLASSID% device boot >nul
bcdedit.exe /set %CLASSID% path %MBRP% >nul
bcdedit.exe /displayorder %CLASSID% /addlast >nul
bcdedit.exe /timeout %timeout% >nul作者: HYE 时间: 2009-6-9 08:00
批处理能写了,难道不会copy、del、ren这些命令?在omnifs也有这些命令的作者: yuanyong911 时间: 2009-6-9 09:17
HYE 老大很感谢您!我的这段 命令 是运行在VISTA系统下的