|
本帖最后由 2011sllyjs 于 2013-7-24 14:22 编辑
自己写了一个把pe安装到硬盘的批处理·现在就差一个问题·如何用命令判断硬盘分区是mbr的还是guid
希望大家帮忙
命令如下
@echo off
echo 正在安装System recovery solution请稍后...
xcopy recovery.wim "%SystemDrive%\System recovery solution\" /y >nul
attrib "%SystemDrive%\System recovery solution" +r +s +h >nul
xcopy boot.sdi "%SystemDrive%\System recovery solution\" /y >nul
bcdedit /timeout 3 >nul
set RAMDISK_OPTIONS={e92b8e30-a6e5-41f6-a6b9-188230a23dd2} >nul
set WINPE_GUID={54b4c01f-dce0-102a-a4e0-462c07a00c5e} >nul
bcdedit /create %RAMDISK_OPTIONS% /d "启动 System recovery solution" /device >nul
bcdedit /set %RAMDISK_OPTIONS% ramdisksdidevice partition=%SystemDrive% >nul
bcdedit /store %bcd_path% /set %RAMDISK_OPTIONS% ramdisksdipath "\System recovery solution\boot.sdi" >nul
bcdedit /create %WINPE_GUID% /d "启动 System recovery solution" /application OSLOADER >nul
bcdedit /set %WINPE_GUID% device ramdisk="[%SystemDrive%]\System recovery solution\recovery.wim",%RAMDISK_OPTIONS% >nul
bcdedit /set %WINPE_GUID% path \windows\system32\boot\winload.exe >nul
bcdedit /set %WINPE_GUID% osdevice ramdisk="[%SystemDrive%]\System recovery solution\recovery.wim",%RAMDISK_OPTIONS% >nul
bcdedit /set %WINPE_GUID% systemroot \windows >nul
bcdedit /set %WINPE_GUID% detecthal yes >nul
bcdedit /set %WINPE_GUID% nx optin >nul
bcdedit /set %WINPE_GUID% winpe yes >nul
bcdedit /set %WINPE_GUID% locale zh-CN >nul
bcdedit /displayorder %WINPE_GUID% /addlast >nul
cls
echo System recovery solution安装完毕,请按任意键退出...
pause>nul
exit |
|