|
原帖由 kenhun 于 2012-8-1 19:10 发表 
@echo off
:_done
echo 准备安装到D盘。要安装到其他盘请自行修改该文件!
echo 安装前请将\SOURCES\BOOT.WIM,\BOOT\boot.sdi及根目录下所有文件拷贝到D盘根目录下!
echo 安装前请将 BOOT整个文件夹和bootmgr 拷贝到c:\
pause
echo 正在添加WINDOWS7 PE3.1旗舰版启动菜单,请稍后...
echo.
echo Copyright (c) 2008-2011 Kinglion南狮王. All rights reserved.
echo.
bootsect /nt60 c: /force /mbr
bcdedit /store c:\boot\bcd /delete {bootmgr} /f
bcdedit /store c:\boot\bcd /delete {ad6c7bc8-fa0f-11da-8ddf-0013200354d8} /f
bcdedit /store c:\boot\bcd /delete {572bcd56-ffa7-11d9-aae0-0007e994107d} /f
bcdedit /store c:\boot\bcd /delete {ntldr} /f
bcdedit /store c:\boot\bcd /create {bootmgr} /d "Windows Boot Manager"
bcdedit /store c:\boot\bcd /set {bootmgr} device boot
bcdedit /store c:\boot\bcd /timeout 3
bcdedit /store c:\boot\bcd /set {bootmgr} locale "zh-CN"
bcdedit.exe /store c:\boot\bcd -create {ntldr} -d "WindowsXP"
bcdedit.exe /store c:\boot\bcd -set {ntldr} device partition=C:
bcdedit.exe /store c:\boot\bcd -set {ntldr} path \ntldr
bcdedit.exe /store c:\boot\bcd -displayorder {ntldr} /addlast
bcdedit.exe /store c:\boot\bcd -set {bootmgr} locale "zh-CN"
rem bcdedit.exe /store c:\boot\bcd -set {current} locale "zh-CN"
bcdedit.exe /store c:\boot\bcd -set {default} locale "zh-CN"
bcdedit.exe /store c:\boot\bcd -set {memdiag} locale "zh-CN"
REM
REM {ad6c7bc8-fa0f-11da-8ddf-0013200354d8}
REM
set RAMDISK_OPTIONS={ad6c7bc8-fa0f-11da-8ddf-0013200354d8}
REM
REM {572bcd56-ffa7-11d9-aae0-0007e994107d}, GUID for the WinPE boot entry
REM
set WINPE_GUID={572bcd56-ffa7-11d9-aae0-0007e994107d}
REM
REM Set Timeout
REM
REM
REM Create Ramdisk device options for the boot.sdi file
REM
bcdedit.exe /store c:\boot\bcd -create %RAMDISK_OPTIONS% -d "Windows7 PE3.1旗舰版 (Ramdisk)" -device
bcdedit.exe /store c:\boot\bcd -set %RAMDISK_OPTIONS% ramdisksdidevice partition=D:
bcdedit.exe /store c:\boot\bcd -set %RAMDISK_OPTIONS% ramdisksdipath \boot.sdi
REM
REM Create WinRE boot entry
REM
bcdedit.exe /store c:\boot\bcd -create %WINPE_GUID% -d "Windows7 PE3.1旗舰版" -application OSLOADER
bcdedit.exe /store c:\boot\bcd -set %WINPE_GUID% device ramdisk=[D:]\BOOT.wim,%RAMDISK_OPTIONS%
bcdedit.exe /store c:\boot\bcd -set %WINPE_GUID% path \windows\system32\boot\winload.exe
bcdedit.exe /store c:\boot\bcd -set %WINPE_GUID% osdevice ramdisk=[D:]\BOOT.wim,%RAMDISK_OPTIONS%
bcdedit.exe /store c:\boot\bcd -set %WINPE_GUID% systemroot \windows
bcdedit.exe /store c:\boot\bcd -set %WINPE_GUID% detecthal yes
bcdedit.exe /store c:\boot\bcd -set %WINPE_GUID% nx optin
bcdedit.exe /store c:\boot\bcd -set %WINPE_GUID% winpe yes
bcdedit.exe /store c:\boot\bcd -set %WINPE_GUID% locale "zh-CN"
bcdedit.exe /store c:\boot\bcd -displayorder %WINPE_GUID% /addlast
echo Windows Preinstallation Environment安装完毕。
echo.
echo 欢迎访问:http://732397741.qzone.qq.com/
echo.
pause
XP系统下的参考代码,添加启动管理器菜单的 |
|