|
FEXT &&ext=%1
FIND $cab=%&ext%, call handcab %1
FIND $7z=%&ext%, call hand7z %1
FIND $wim=%&ext%, call handwim %1
BROW Tag,x:\*.7z;*.cab;*.wim,请选择一个驱动包,cab或7z或wim驱动包|*.cab;*.7z;*.wim|
FEXT &&ext=%Tag%
FIND $cab=%&ext%, Call handcab "%Tag%"
FIND $7z=%&ext%, Call hand7z "%Tag%"
FIND $wim=%&ext%, Call handwim "%Tag%"
_SUB hwids
exec* &&all=!devcon findall *
READ -,0,&&line,%&all%
mstr &&Q=<1>%&line%
ENVI-ret %1=%&Q%
_END
_SUB handcab
TEAM TEXT 正在安装驱动,请稍等……$15|WAIT 100
CALL hwids &&ID1
DEVI $%~1,
WAIT 500
CALL hwids &&ID2
find |%&ID1%<%&ID2%, DEVI $%~1,
exit file
_END
_SUB hand7z
TEAM TEXT 正在安装驱动,请稍等……$15|WAIT 100
NAME &&fname=%~1
CALL hwids &&ID1
EXEC =!%programfiles%\7-zip\7z.exe x %1 -o%temp%\pe-driver\%&fname%
EXEC =!DPinst.exe /S /Path %temp%\pe-driver\%&fname%
WAIT 500
CALL hwids &&ID2
find |%&ID1%<%&ID2%, EXEC -hide -wait DPinst.exe /S /Path %temp%\pe-driver\%&fname%
FILE %temp%\pe-driver
exit file
_END
_SUB handwim
TEAM TEXT 正在安装驱动,请稍等……$15|WAIT 100
NAME &&fname=%~1
CALL hwids &&ID1
RAMD ImDisk,L64,NTFS,,drvDisk,,1
MOUN %1,%CurRamDisk%\%&fname%,1
EXEC =!DPinst.exe /S /Path %CurRamDisk%\%&fname%
WAIT 500
CALL hwids &&ID2
find |%&ID1%<%&ID2%, EXEC -hide -wait DPinst.exe /S /Path %CurRamDisk%\%&fname%
MOUN *u %1,%CurRamDisk%\%&fname%
WAIT 200
RAMD ImDisk* -d -m %CurRamDisk%
exit file
_END
这是我从别人pe里面抄过来的,,,你自己注意改下7z.exe,,DPinst.exe的路径 |
|