|
3#
楼主 |
发表于 2010-2-28 14:36:56
|
只看该作者
包括单文件SYS的OEM,程序如下:
:F6ZIP
PKUNZIP -od %disk%\SRS.zip a:\
if exist A:\txtsetup.oem goto :OEM
if not exist A:\*.sy? goto :F6end
>sys.txt dir /b a:\*.sy?
<sys.txt lmod /S. /l* call single.bat [$1 U]>pci.bat
del sys.txt
call pci.bat
del pci.bat
:F6end
>a:\DEFAULTS echo [DEFAULTS]scsi=%F6DEF%
inifile a:\txtsetup.oem [Defaults] /remove
>txtsetup.tmp echo [Defaults]
>>txtsetup.tmp if not "%F6DEF%"=="" echo scsi=%F6DEF%
>>txtsetup.tmp echo ;;;;
>nul copy /Y txtsetup.tmp /B + a:\txtsetup.oem /B
>nul copy /Y txtsetup.tmp a:\txtsetup.oem
del txtsetup.tmp
goto :exit
:OEM
str a:\txtsetup.oem 0 0 /r /mix:\09= /asc:= /a >nul
str a:\txtsetup.oem 0 0 /r /mix:\09= /asc:= /a >nul
inifile a:\txtsetup.oem [scsi]|lmod /l* inifile a:\txtsetup.oem [[HardwareIds.scsi.[$2]][~124]lmod /l* $[[$3]=[$2][~62][~62]F6.tmp>_gethid.bat
call _gethid.bat
del _gethid.bat
<F6.tmp sort /*-2>F6.pci
del F6.tmp
if not exist F6.pci goto F6end
cd|lmod $[~255][-]>>F6.pci
>nul copy /Y CHKPCI.BIN /B + F6.pci /B F6.com
del F6.pci
F6.COM|lmod set F6DEF=[$2]>_gethid.bat
call _gethid.bat
F6.COM|lmod set HWID=[$1]>_gethid.bat
del f6.com
call _gethid.bat
del _gethid.bat
inifile a:\txtsetup.oem [Defaults] /remove
>>a:\txtsetup.oem echo [Defaults]
>>a:\txtsetup.oem if not "%F6DEF%"=="" echo scsi=%F6DEF%
inifile a:\txtsetup.oem [HardwareIds.scsi.%F6DEF%]>f6.tmp
tfind /c "%HWID%" f6.tmp > f6.PCI
del f6.tmp
inifile a:\txtsetup.oem [HardwareIds.scsi.%F6DEF%] /remove
>>a:\txtsetup.oem echo [HardwareIds.scsi.%F6DEF%]
<F6.PCI lmod set F6DEF="[$3]","[$4]" >F6.BAT
del F6.PCI
call f6.bat
del f6.bat
>>a:\txtsetup.oem echo id = %F6DEF%
:exit
single.bat
>a:\txtsetup.oem echo [Disks]
>>a:\txtsetup.oem echo %1="AHCI&RAID DRIVER",\DEFAULTS,\
>>a:\txtsetup.oem echo [scsi]
>>a:\txtsetup.oem echo %1="%1 Disk Driver"
>>a:\txtsetup.oem echo [Files.scsi.%1]
>>a:\txtsetup.oem echo driver=%1,%1.sys,%1
>>a:\txtsetup.oem echo inf=%1,%1.inf
>>a:\txtsetup.oem echo [HardwareIds.scsi.%1]
pciscan -v|tfind "Disk"|tfind /v "IDE"|lmod /l* id="PCI\VEN_[$5][~38]DEV_[$6]","%1">>a:\txtsetup.oem
pciscan -v|tfind "Disk"|tfind /v "IDE"|lmod /l* id="PCI\VEN_[$5][~38]DEV_[$6]","%1"
set F6DEF=%1
>nul xcp /y c:\KERNEL\inf.txt a:\%1.inf
pciscan -v|tfind "Disk"|tfind /v "IDE"|lmod /l* "SCSI Adapter"=Inst,PCI\VEN_[$5][~38]DEV_[$6]>>a:\%1.inf |
|