帮写个CMD命令添加pe文件到BCD启动菜单
硬盘格式:GPTBCD文件在ESP分区
PE文件 在D:\PE\pe.wim
boot.sdi 在D:\pe\boot.sdi
沙发 BOOTICE.BCDEDIT等软件不都有这种功能么? 邪恶海盗 发表于 2023-1-12 20:57
BOOTICE.BCDEDIT等软件不都有这种功能么?
用软件当然会,想要弄个封装系用的 楼主解决了吗,这个问题的答案我也想知道啊 ZMLoveLH 发表于 2023-1-12 21:52
楼主解决了吗,这个问题的答案我也想知道啊
还没有呢
必须用bcdedit啊 szwp 发表于 2023-1-13 07:00
必须用bcdedit啊
相大师,你出手就很简单了 以前保存的 你改改吧
@echo off
pushd "%~dp0"
echo.&echo.
if exist bcd_tmp del bcd_tmp
bcdedit >temp_bcd.txt 2>nul
type temp_bcd.txt | find /i "winload.efi" &&(set "winload=winload.efi")||(set winload=winload.exe)
type temp_bcd.txt | find "{ramdiskoptions}" >nul
IF ERRORLEVEL 1 goto ramd
cls&echo.&echo.
:start
for /f "delims={,} tokens=2" %%a in ('bcdedit -create /d "WindowsPE" -application osloader') do set ID={%%a}
bcdedit %bcddir% -set %ID% device ramdisk="\Sources\WinPE.WIM,{ramdiskoptions}"
bcdedit %bcddir% -set %ID% osdevice ramdisk="\Sources\WinPE.WIM,{ramdiskoptions}"
bcdedit %bcddir% -set %ID% path \windows\system32\boot\%winload%
bcdedit %bcddir% -set %ID% locale zh-CN
bcdedit %bcddir% -set %ID% systemroot \windows
bcdedit %bcddir% -set %ID% detecthal no
bcdedit %bcddir% -set %ID% winpe yes
bcdedit %bcddir% -set %ID% testsigning yes
bcdedit %bcddir% -set %ID% nointegritychecks yes
bcdedit %bcddir% -set %ID% pae forceenable
bcdedit %bcddir% -set %ID% bootmenupolicy Legacy
bcdedit %bcddir% -displayorder %ID% -addlast
goto end
:ramd
cls&echo.&echo.
bcdedit /create {ramdiskoptions}
bcdedit /set {ramdiskoptions} ramdisksdidevice "boot"
bcdedit /set {ramdiskoptions} ramdisksdipath \efi\boot.sdi
goto start
:end
echo.&echo.&echo Add-Wim to BCD OK !!! &timeout /t 5 &exit cmd里运行regedit这个进行管理不行么 沙发 oym2016 发表于 2023-1-13 08:45
以前保存的 你改改吧
@echo off
助人为乐 感谢分享
页:
[1]