| 
 | 
- @echo off
 
 - ::
 
 - set wim=testpe
 
 - set sdi=boot
 
 - set title=%wim%
 
 - set partition=z:
 
 - ::
 
 - mountvol.exe %partition% /s
 
 - ::
 
 - if exist "%partition%\boot\%wim%\id_1" (set/p id_1=<"%partition%\boot\%wim%\id_1" )
 
 - if exist "%partition%\boot\%wim%\id_2" (set/p id_2=<"%partition%\boot\%wim%\id_2" )
 
 - bcdedit /delete %id_1% /f >nul 2>nul
 
 - bcdedit /delete %id_2% /f >nul 2>nul
 
 - ::
 
 - set id1={%time:~6,2%%time:~9,2%ffff-8d96-11de-8e71-fffffffffffa}
 
 - set id2={%time:~6,2%%time:~9,2%ffff-8d96-11de-8e71-fffffffffffb}
 
 - bcdedit /create %id2% /d "%title%" /device
 
 - bcdedit /set %id2% ramdisksdidevice partition=%partition%
 
 - bcdedit /set %id2% ramdisksdipath "\boot\%wim%\%sdi%.sdi"
 
 - ::
 
 - bcdedit /create %id1% /d "%title%" /application osloader
 
 - bcdedit /set %id1% device ramdisk="[%partition%]\boot\%wim%\%wim%.wim",%id2%
 
 - bcdedit /set %id1% osdevice ramdisk="[%partition%]\boot\%wim%\%wim%.wim",%id2%
 
 - bcdedit /set %id1% path \windows\system32\boot\winload.efi
 
 - bcdedit /set %id1% description "%title%"
 
 - bcdedit /set %id1% locale zh-CN
 
 - bcdedit /set %id1% inherit {bootloadersettings}
 
 - bcdedit /set %id1% systemroot \windows
 
 - bcdedit /set %id1% detecthal Yes
 
 - bcdedit /set %id1% winpe Yes
 
 - bcdedit /set %id1% ems no
 
 - bcdedit /displayorder %id1% /addlast
 
 - ::
 
 - mountvol.exe %partition% /d
 
 - ::
 
 - timeout /t 5
 
  复制代码 
 
EFI_addwim_tmp2020517.txt
(1.25 KB, 下载次数: 16)
 
 
 
 |   
 
 
 
 |