|
boot.wim.Path-2.73还是不行。
我先用着这个对付下,这已经很感谢了,
CALL FINDFZ
FDIR wimPath=%wzPath%
_SUB FINDFZ
REGI .HKLM\SYSTEM\CurrentControlSet\Control\SystemStartOptions,&sso
forx * %&sso% ,&p0,
{
envi &&item0=
mstr &&item0=0,7,%&p0%
Find $"%&item0%"="RDPATH=" ,
{
mstr &p0=8,0,%&p0%
mstr -delims:\ value1=<1>%&p0%
}
}
Find $"%value1%"<>"",
{ //注册表信息读取成功
sed *ni &str2=0,[()0123456789], ,%value1%
mstr &type1=<3>%&str2%%
mstr RDISK=22,1,%value1%
ifex '%&type1%'='cdrom',
{ //如果是光驱启动,则查找光驱内标志性文件,获取配置文件所在的光驱盘符
FORX !\Setup\安装WinPE.CMD,STPATH,1,FDRV STPATH=%STPATH%
ENVI wzPath=%STPATH%\WEPE\WEPE.INI
}!
{ //如果不是光驱,就读取一下 分区信息,获取分区所在硬盘号,分区号,盘符
part -drv list volume \ArcName\%value1%,&part_info
ifex '%&part_info%'<>'',
{ //获取到了 路径对应的硬盘/分区/盘符 信息
mstr &disk,&part,<r=<2><3><8>%&part_info%
Find $"%<r%"="",
{ //该卷没有被分配盘符立即分配
fdrv -idlec &drvs=*:
mstr &drvx=<1>%&drvs%
DISK %&drvx%,%&disk%,%&part%,1
ENVI wzPath=%&drvx%\WEPE\WEPE.INI
}
}!
{ //未知原因list volume没有获取到信息,尝试笨方法分配U启隐藏分区
fdrv -idlec &drvs=*:
mstr &drvx=<1>%&drvs%
DISK %&drvx%,%RDISK%,2,1
ENVI wzPath=%&drvx%\WEPE\WEPE.INI
}
}
}
IFEX %wzPath%,!
{
MOUN !\WEPE\WEPE.INI,X:\a,1
FILE X:\a
FORX !\WEPE\WEPE.INI,fPath,1,ENVI wzPath=%fPath%
}
IFEX %wzPath%,!
{
SHOW -1:-1
fdrv &drvs=*:
forx * %&drvs%,&drvx,
{
ifex ! %&drvx%\,subj -%&drvx%
}
FORX !\WEPE\WEPE.INI,fPath,1,ENVI wzPath=%fPath%
}
EXEC =!CMD /C ECHO ENVI wzPath=%wzPath% > %temp%\wzPath.INI
_END
|
|