|
回复 #10 dengxiong 的帖子
@ECHO OFF
@CD /D "%~DP0"
BCDEDIT.EXE /CREATESTORE "C:\BOOT\BCD" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /CREATE {BOOTMGR} /D "Windows Boot Manager" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET {BOOTMGR} LOCALE "en-US" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /CREATE {RAMDISKOPTIONS} /D "Ramdisk Options" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET {RAMDISKOPTIONS} RAMDISKSDIDEVICE "BOOT" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET {RAMDISKOPTIONS} RAMDISKSDIPATH "\BOOT\BOOT.SDI" >NUL
@SET VID=
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /CREATE /D "WIN7PE.WIM" /APPLICATION OSLOADER >"%TEMP%\VID.TXT"
FOR,/F,"TOKENS=2 DELIMS={",%%I,IN (%TEMP%\VID.TXT) DO (SET VIDA=%%I)
FOR,/F,"TOKENS=1 DELIMS=}",%%I,IN ("%VIDA%") DO (SET VID={%%I})
ECHO %VID%>"%TEMP%\VID.TXT"
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% DEVICE RAMDISK=[BOOT]\BOOT\WIN7PE.WIM,{RAMDISKOPTIONS} >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% OSDEVICE RAMDISK=[BOOT]\BOOT\WIN7PE.WIM,{RAMDISKOPTIONS} >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% PATH "\WINDOWS\SYSTEM32\BOOT\WINLOAD.EXE" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% SYSTEMROOT "\WINDOWS" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% NX "OptIn" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% PAE "ForceEnable" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% DETECTHAL "YES" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% WINPE "YES" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET %VID% LOCALE "en-US" >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET {BOOTMGR} DEFAULT %VID% >NUL
BCDEDIT.EXE /STORE "C:\BOOT\BCD" /SET {BOOTMGR} TIMEOUT "9" >NUL
@DEL /F /A /Q "\\?\%TEMP%\VID.TXT" >NUL
@REG.EXE LOAD "HKLM\TEMP_LOAD_BCD" "C:\BOOT\BCD" >NUL
@REG.EXE ADD "HKLM\TEMP_LOAD_BCD\Description" /f /v "SYSTEM" /t REG_DWORD /d "1" >NUL
@REG.EXE ADD "HKLM\TEMP_LOAD_BCD\Description" /f /v "TreatAsSystem" /t REG_DWORD /d "1" >NUL
@REG.EXE UNLOAD "HKLM\TEMP_LOAD_BCD" >NUL
@EXIT |
|