|
回复 #33 阿弥陀佛 的帖子
找到一些有关挂载与卸载隐藏区的教材
在内核中加入bootpart(三文件,bootpart.exe、bootaprt.sys,64位pe加bootpt64.sys),然后把pecmd.ini调用外置winP.ini的脚本改用调用load.cmd脚本,EXEC =!%WinDir%\SYSTEM32\LOAD.CMD。再由load.cmd脚本智能调用winpe.in:PE内核启动后,如果可见区找得到外置配置文件winpe.ini,就用pecmd直接加载外置吧;找不到就用bootpart只读挂载U+或B+隐藏区,然后再加载外置。Load.cmd脚本如下,请大家慢慢改进:
@echo off
Rem 以下脚本由独剑制作,可以智能加载可见区及U+B+隐藏区外置;
Rem 在xp 03 win7 win8普通及极速PE中测试通过
Rem 加载03PE的配置文件名为win03PE.INI
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 W) DO if exist %%x:\TOOLS\win03PE.INI goto cd
goto ULBI
rem 以下为部署到可见区,直接调用脚本
:cd
%WinDir%\SYSTEM32\pecmd.exe load \TOOLS\win03PE.INI
goto end
rem 以下部署到U+B+隐藏区,用bootpart只读挂载隐藏区到T盘再来挂载外置
:ULBI
%windir%\system32\bootpart.exe -mount -readonly -driveletter T:
if not exist T:\TOOLS\win03PE.INI goto end2
%WinDir%\SYSTEM32\pecmd.exe load T:\TOOLS\win03PE.INI
goto end
:end2
%windir%\system32\bootpart.exe -eject
@echo on
exit
:end
@echo on
exit
有些朋友并不喜欢用cmd脚本,同时为了保持方案的通用性,这里提供pecmd脚本。也就是在内核中加入bootpart(三文件,bootpart.exe、bootaprt.sys,64位pe加bootpt64.sys)后,大家把把pecmd.ini调用外置处(load
winpe.ini),改成如下脚本就可以:
//试着用bootpart只读挂载U+和B+隐藏区到T盘
EXEC =!%windir%\system32\bootpart.exe -mount -readonly -driveletter T:
//如果T盘存在配置文件,则说明挂载成功直接加载T盘外置;如无配置文件,则取消挂载,用pecmd load加载可见区外置。
IFEX T:\TOOLS\win03PE.INI,LOAD T:\TOOLS\win03PE.INI!TEAM TEXT 载入可见区外置| EXEC =!%windir%\system32\bootpart.exe -eject|load \TOOLS\win03PE.INI
····················································································································································
感谢独剑老师提供脚本 |
|