|
我自己一直用双iso方式的winpe。
近期想全内置为单iso,这在放隐藏分区时是必须的。
有一个好办法,就是把bootcd.iso(内含外置程序)压入winpe.is_,原来的批处理稍稍完善一下,逻辑盘符原来只到v,改到z:
winpefiles.cmd:
@echo off
IF EXIST W: GOTO END
set ff=winpefiles
for %%x in (A B C D E F G H I J K L M N O P Q R S T U V X Y Z) DO if exist %%x:\外置程序\winpe.ini goto end
for %%x in (A B C D E F G H I J K L M N O P Q R S T U V X Y Z) DO (
if exist %%x:\bootcd.iso set fn=%%x:\bootcd.iso
if exist %%x:\bootcd.iso GOTO iso
if exist %%x:\%ff%.iso set fn=%%x:\%ff%.iso
if exist %%x:\%ff%.iso GOTO iso
if exist %%x:\%ff%.img set fn=%%x:\%ff%.img
if exist %%x:\%ff%.img GOTO img
)
goto end
:iso
REG ADD "HKCU\Software\Towodo Software\Virtual Drive Manager\Settings" /f /v MountPrevious /t REG_DWORD /d 1 >nul
REG ADD "HKCU\Software\Towodo Software\Virtual Drive Manager\Settings" /f /v XbtnQuit /t REG_DWORD /d 0 >nul
REG ADD "HKCU\Software\Towodo Software\Virtual Drive Manager\Settings" /f /v LastMounts /t REG_MULTI_SZ /s ! /d W:!自动侦测!%fn%!1 >nul
REG ADD "HKCU\Software\Towodo Software\虚拟驱动器\Settings" /f /v MountPrevious /t REG_DWORD /d 1 >nul
REG ADD "HKCU\Software\Towodo Software\虚拟驱动器\Settings" /f /v XbtnQuit /t REG_DWORD /d 0 >nul
REG ADD "HKCU\Software\Towodo Software\虚拟驱动器\Settings" /f /v LastMounts /t REG_MULTI_SZ /s ! /d W:!自动侦测!%fn%!1 >nul
goto vdm
:img
REG ADD "HKCU\Software\Towodo Software\Virtual Drive Manager\Settings" /f /v MountPrevious /t REG_DWORD /d 1 >nul
REG ADD "HKCU\Software\Towodo Software\Virtual Drive Manager\Settings" /f /v XbtnQuit /t REG_DWORD /d 0 >nul
REG ADD "HKCU\Software\Towodo Software\Virtual Drive Manager\Settings" /f /v LastMounts /t REG_MULTI_SZ /s ! /d W:!自动侦测!%fn%!%imgro% >nul
REG ADD "HKCU\Software\Towodo Software\虚拟驱动器\Settings" /f /v MountPrevious /t REG_DWORD /d 1 >nul
REG ADD "HKCU\Software\Towodo Software\虚拟驱动器\Settings" /f /v XbtnQuit /t REG_DWORD /d 0 >nul
REG ADD "HKCU\Software\Towodo Software\虚拟驱动器\Settings" /f /v LastMounts /t REG_MULTI_SZ /s ! /d W:!自动侦测!%fn%!%imgro% >nul
:vdm
start vdm1.exe /i
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo 稍等片刻......
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Wait
pecmd wait 1000
IF NOT EXIST W: GOTO Wait
if exist W:\外置程序\winpe.ini pecmd load W:\外置程序\winpe.ini
:end |
|