@echo off
title 安装天意Win7PE 3.1到硬盘
echo.
echo 请使用管理员帐户运行
echo.
echo 请选择Win7PE安装的位置......
echo 不建议选择分区根目录,最好事先在分区根目录下新建一个目录,
echo 接下来选择目录时就选这个目录。
Select_Folder "set d_temp=" "c:" "请选择Win7PE安装的位置(不要选择分区根目录)" >%temp%\a.bat
call %temp%\a.bat
del %temp%\a.bat>nul
set d_all=%d_temp:~1,-1%
set d_full=%d_all%\Win7PE3.0
md %d_full%
echo 文件复制...
copy .\sources\pe_x86.wim %d_full%
copy .\sources\boot.sdi %d_full%
attrib %d_full% +r +s +h
set PP=%d_full:~0,2%
set DP=%d_full:~3%
echo 请稍候...
bcdedit /timeout 5
set RAMDISK_OPTIONS={e92b8e30-a6e5-41f6-a6b9-188230a23dd2}
set WINPE_GUID={54b4c01f-dce0-102a-a4e0-462c07a00c5e}
bcdedit /create %RAMDISK_OPTIONS% /d "WinPE 3.0 X86" /device
bcdedit /set %RAMDISK_OPTIONS% ramdisksdidevice partition=%PP%
bcdedit /set %RAMDISK_OPTIONS% ramdisksdipath \%DP%\boot.sdi
bcdedit /create %WINPE_GUID% /d "WinPE 3.0 32位" /application OSLOADER
bcdedit /set %WINPE_GUID% device ramdisk=[%PP%]\%DP%\pe_x86.wim,%RAMDISK_OPTIONS%
bcdedit /set %WINPE_GUID% path \windows\system32\sources\winload.exe
bcdedit /set %WINPE_GUID% osdevice ramdisk=[%PP%]\%DP%\pe_x86.wim,%RAMDISK_OPTIONS%
bcdedit /set %WINPE_GUID% systemroot \windows
bcdedit /set %WINPE_GUID% detecthal yes
bcdedit /set %WINPE_GUID% nx optin
bcdedit /set %WINPE_GUID% winpe yes
bcdedit /displayorder %WINPE_GUID% /addlast
echo 已完成WinPE 3.0安装。
pause
自己改吧 |