一下加载光驱设备驱动那儿有错啊?
@echo off
if %1*==?* goto usage
if %1*==/?* goto usage
if %1*==-?* goto usage
for %%a in (h H /H /h -H -h help HELP /HELP /help -help) do if %%a*==%1* goto usage
:main
wbat pal ! cls ! text 24,4 @%ramd%\dic.dic:copyright
call w.bat box 2 @%ramd%\dic.dic:_cdrom #2,5
if errorlevel 100 goto end
if %?%*==4* goto help
if %?%*==3* goto super
if %?%*==2* goto cancel
if %?%*==1* goto loaddrv
goto end
:help
wbat pal ! cls ! fill 6,4 (16,74) (black on +brown)
set Wtexthi=blue on +brown
wbat text 2,4 @%ramd%\dic.dic:_cd_help ! text 24,4 @%ramd%\dic.dic:copyright
set Wtexthi=
wbat box 20,54 确定,取消
if errorlevel 100 goto main
if errorlevel 2 goto end
if errorlevel 1 goto main
goto end
:super
call driver.bat
goto end
:cancel
wbat pal ! cls ! fill 6,4 (16,74) (+white on +red)
set Wtexthi=blue on +brown
wbat text 2,4 @%ramd%\dic.dic:_cd_cancel ! text 24,4 @%ramd%\dic.dic:copyright
set Wtexthi=
wbat box 20,54 返回,取消
if errorlevel 100 goto main
if errorlevel 2 goto end
if errorlevel 1 goto main
goto end
:loaddrv
set y=
if %wrb%*==1* set auto=one
if %wrb%*==2* set auto=all
if %wcb1%*==1* goto sata
if %wcb2%*==1* goto usb
if %wcb3%*==1* goto iee
if %wcb4%*==1* goto pcm
for %%a in (one all) do if %auto%*==%%a* goto %%a
goto end
:check
set cdrom=
set cdd=
findcd >NUL
if exist %cdrom%\dos\__info.bat set cdd=%cdrom%
set cdrom=
for %%a in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26) do set cdrom%%a=
findcd /s >NUL
if not %cdd%*==* goto end
for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%a:\dos\__info.bat set cdd=%%a:
if not %cdd%*==* goto end
if not %auto%*==one* goto ncheck
set y=%y%x
goto %y%
:ncheck
echo 未发现电脑管理员随身光盘!
goto end
:one
call driver.bat UDVD.SYS /D:UDVD-CD
if %flag%*==1* echo 发现SATA/PATA光驱!
if %flag%*==1* goto shcdx
:x
call driver.bat VIDE-CDD.SYS /D:IDE-CD
if %flag%*==1* echo 发现通用IDE/ATAPI光驱!
if %flag%*==1* goto shcdx
:xx
call driver.bat GCDROM.SYS /D:SATA-CD
if %flag%*==1* echo 发现通用SATA光驱!
if %flag%*==1* goto shcdx
:xxx
call driver.bat EXTCD.SYS
if %flag%*==1* echo 发现Serial-ATA光驱!
if %flag%*==1* goto shcdx
:xxxx
call driver,bat USBASPI.SYS
if %flag%*==1* echo 发现USB闪存设备!
set usb2=
if %flag%*==1* set usb2=yes
call driver.bat USBCD.SYS /D:USB-CD
set usbd=
if %flag%*==1* set usbd=yes
if %flag%*==1* echo 发现通用USB/SCSI光驱!
if %usb2%*==yes* call driver.bat DI1000DD.SYS
if %flag%*==1* echo 可以对其USB闪存设备进行盘符分配!
set usb2=
if %usbd%*==yes* goto shcdx
:xxxxx
call driver.bat USB_CD.SYS /D:OUSB-CD
if %flag%*==1* echo 发现少数类型的USB光驱!
if %flag%*==1* goto shcdx
:xxxxxx
call driver.bat ASPICD.SYS /D:SCSI-CD
if %flag%*==1* echo 发现通用SCSI光驱!
if %flag%*==1* goto shcdx
:xxxxxxx
call driver.bat ASPI1394.SYS /int /all
if %flag%*==1* echo 发现1394驱动器
call driver.bat SBP2ASPI.SYS
if %flag%*==1* echo 发现IEEE1394设备
call driver.bat CDSDMINI.SYS /D:1394-CD
if %flag%*==1* echo 发现通用1394光驱!
if %flag%*==1* goto shcdx
:xxxxxxxx
call driver.bat PCMI80CL.SYS /P1 /QA
if %flag%*==1* echo 发现笔记本PCMCIA设备
if not %flag%*==1* echo 经检测未发现任何笔记本PCMCIA设备!
call driver.bat STATPCDM.SYS /D:PCM-CD
if %flag%*==1* echo 发现通用笔记本PCMCIA光驱!
if %flag%*==1* goto shcdx
echo 经检测未发现任何光驱,请确保光驱设备良好!
goto end
:all
call driver.bat UDVD.SYS /D:UDVD-CD
if %flag%*==1* echo 发现SATA/PATA光驱!
if %flag%*==1* goto nusb
call driver.bat VIDE-CDD.SYS /D:IDE-CD
if %flag%*==1* echo 发现通用IDE/ATAPI光驱!
if %flag%*==1* goto nusb
call driver.bat GCDROM.SYS /D:SATA-CD
if %flag%*==1* echo 发现通用SATA光驱!
if %flag%*==1* goto nusb
call driver.bat EXTCD.SYS
if %flag%*==1* echo 发现Serial-ATA光驱!
if %flag%*==1* goto nusb
:nusb
call driver,bat USBASPI.SYS
if %flag%*==1* echo 发现USB闪存设备!
set usb2=
if %flag%*==1* set usb2=yes
call driver.bat USBCD.SYS /D:USB-CD
set usbd=
if %flag%*==1* set usbd=yes
if %flag%*==1* echo 发现通用USB/SCSI光驱!
if %usb2%*==yes* call driver.bat DI1000DD.SYS
if %flag%*==1* echo 可以对其USB闪存设备进行盘符分配!
set usb2=
if %usbd%*==yes* goto niee
call driver.bat USB_CD.SYS /D:OUSB-CD
if %flag%*==1* echo 发现少数类型的USB光驱!
if %flag%*==1* goto niee
call driver.bat ASPICD.SYS /D:SCSI-CD
if %flag%*==1* echo 发现通用SCSI光驱!
if %flag%*==1* goto niee
:niee
call driver.bat ASPI1394.SYS /int /all
if %flag%*==1* echo 发现1394驱动器
call driver.bat SBP2ASPI.SYS
if %flag%*==1* echo 发现IEEE1394设备
call driver.bat CDSDMINI.SYS /D:1394-CD
if %flag%*==1* echo 发现通用1394光驱!
if %flag%*==1* goto npcm
:npcm
call driver.bat PCMI80CL.SYS /P1 /QA
if %flag%*==1* echo 发现笔记本PCMCIA设备
if not %flag%*==1* goto shcdx
call driver.bat STATPCDM.SYS /D:PCM-CD
if %flag%*==1* echo 发现通用笔记本PCMCIA光驱!
goto shcdx
:sata
call driver.bat UDVD.SYS /D:UDVD-CD
if %flag%*==1* echo 发现SATA/PATA光驱!
if %flag%*==1* goto shcdx
call driver.bat VIDE-CDD.SYS /D:IDE-CD
if %flag%*==1* echo 发现通用IDE/ATAPI光驱!
if %flag%*==1* goto shcdx
call driver.bat GCDROM.SYS /D:SATA-CD
if %flag%*==1* echo 发现通用SATA光驱!
if %flag%*==1* goto shcdx
call driver.bat EXTCD.SYS
if %flag%*==1* echo 发现Serial-ATA光驱!
if %flag%*==1* goto shcdx
wbat box "没有发现任何SATA/PATA光驱!",确定
if errorlevel 100 goto main
goto main
:usb
call driver,bat USBASPI.SYS
if %flag%*==1* echo 发现USB闪存设备!
set usb2=
if %flag%*==1* set usb2=yes
call driver.bat USBCD.SYS /D:USB-CD
set usbd=
if %flag%*==1* set usbd=yes
if %flag%*==1* echo 发现通用USB/SCSI光驱!
if %usb2%*==yes* call driver.bat DI1000DD.SYS
if %flag%*==1* echo 可以对其USB闪存设备进行盘符分配!
set usb2=
if %usbd%*==yes* goto shcdx
call driver.bat USB_CD.SYS /D:OUSB-CD
if %flag%*==1* echo 发现少数类型的USB光驱!
if %flag%*==1* goto shcdx
call driver.bat ASPICD.SYS /D:SCSI-CD
if %flag%*==1* echo 发现通用SCSI光驱!
if %flag%*==1* goto shcdx
wbat box "没有发现任何USB/SCSI类型的光驱!",确定
if errorlevel 100 goto main
goto main
:iee
call driver.bat ASPI1394.SYS /int /all
if %flag%*==1* echo 发现1394驱动器
call driver.bat SBP2ASPI.SYS
if %flag%*==1* echo 发现IEEE1394设备
call driver.bat CDSDMINI.SYS /D:1394-CD
if %flag%*==1* echo 发现通用1394光驱!
if %flag%*==1* goto shcdx
wbat box "没有发现任何1394设备!",确定
if errorlevel 100 goto main
goto main
:pcm
call driver.bat PCMI80CL.SYS /P1 /QA
if %flag%*==1* echo 发现笔记本PCMCIA设备
if not %flag%*==1* goto shcdx
call driver.bat STATPCDM.SYS /D:PCM-CD
if %flag%*==1* echo 发现通用笔记本PCMCIA光驱!
if %flag%*==1* goto shcdx
wbat box "没有发现任何笔记本PCMCIA设备!",确定
if errorlevel 100 goto main
goto main
:shcdx
mem /c|find /c /i "shcdx33c" >NUL
if not errorlevel 1 shcdx33c /u >NUL
if exist %temp%\allcd.txt del %temp%\allcd.txt >NUL
lh shcdx33c /d:?UDVD-CD /d:?IDE-CD /d:?SATA-CD /d:?EXTCD001 /d:?USB-CD /d:?OUSB-CD /d:?SCSI-CD /d:?1394-CD /d:?PCM-CD /q |find ":" >%temp%\allcd.txt
type %temp%\allcd.txt |find /i "UDVD-CD" >NUL
if not errorlevel 1 echo 加载通用SATA/PATA光驱成功!
type %temp%\allcd.txt |find /i "IDE-CD" >NUL
if not errorlevel 1 echo 加载通用IDE/ATAPI光驱成功!
type %temp%\allcd.txt |find /i "SATA-CD" >NUL
if not errorlevel 1 echo 加载通用SATA光驱成功!
type %temp%\allcd.txt |find /i "EXTCD001" >NUL
if not errorlevel 1 echo 加载戴尔Serial-ATA光驱成功!
type %temp%\allcd.txt |find /i "USB-CD" >NUL
if not errorlevel 1 echo 加载通用USB/SCSI光驱成功!
type %temp%\allcd.txt |find /i "OUSB-CD" >NUL
if not errorlevel 1 echo 加载少数类型USB光驱成功!
type %temp%\allcd.txt |find /i "SCSI-CD" >NUL
if not errorlevel 1 echo 加载通用SCSI光驱成功!
type %temp%\allcd.txt |find /i "1394-CD" >NUL
if not errorlevel 1 echo 加载通用1394光驱成功!
type %temp%\allcd.txt |find /i "PCM-CD" >NUL
if not errorlevel 1 echo 加载笔记本PCMCIA光驱成功!
goto check
:end
for %%a in (usbd y auto wrb wcb1 wcb2 wcb3 wcb4) do set %%a=
其中driver.bat为(未写完)
@echo off
if %1*==?* goto usage
if %1*==/?* goto usage
if %1*==-?* goto usage
if %1*==/h* goto usage
if %1*==/H* goto usage
if %1*==/help* goto usage
if %1*==/HELP* goto usage
for %%a in (h H -H -h help HELP -help -HELP) do if %%a*==%1* goto usage
if not %1*==* goto cmdload
:main
wbat pal ! cls ! text 24,4 @%ramd%\dic.dic:copyright
call w.bat fix box 4 @%ramd%\dic.dic:_driver
if errorlevel 100 goto end
if %?%*==5* goto fenxi
if %?%*==4* goto help
if %?%*==3* goto cancel
if %?%*==2* goto brown
if %?%*==1* goto load
wbat pal ! cls
goto end
:fenxi
if not %wcb1%*==1* goto fenxi1
if %wcb1%*==1* if %spr%*==* goto fenxi2
if not %wcb2%*==1* goto fenxi3
goto fenxied
:fenxi1
wbat box(+white on +red) "分析光驱名功能仅用在需要√选参数的情况下!",确定
if errorlevel 100 goto main
goto main
:fenxi2
wbat box(+white on +red) "你未输入参数,无法使用分析功能获得光驱名!",确定
if errorlevel 100 goto main
goto main
:fenxi3
wbat box(+white on +red) "你未√选光驱选项,无法使用分析功能获得光驱名!",确定
if errorlevel 100 goto main
goto main
:fenxied
if not %par%*==* set tcd=%par%
if not %par%*==* goto fenxiok
set tcd=
set num=0
set tfile=%spr%
strings len=length %tfile%
:fcycle
strings snum=sub %len%,%num%
strings num=add %num%,1
if %snum%*==0* goto ferror
strings str=mid %tfile%,%snum%,1
if %str%*==:* goto fenxiok
if %str%*==* goto fcycle
set tcd=%str%%tcd%
goto fcycle
:ferror
wbat box(+white on +red) "分析光驱名失败,或者参数中不包含光驱名信息,请手工输入!",确定
if errorlevel 100 goto main
goto main
:fenxiok
if not %scd%*==* if %scd%*==%tcd%* goto fcd
if not %scd%*==* if not %scd%*==%tcd%* goto ferrcd
set scd=%tcd%
wbat box (+white on +blue) "分析成功,光驱名为%tcd%!",确定
if errorlevel 100 goto main
goto main
:fcd
wbat box (+white on +blue) "你输入的光驱名好像正确!",确定
if errorlevel 100 goto main
goto main
:ferrcd
wbat box(+white on +red) "你输入的光驱名好像不正确,应该是%tcd%,自动纠正吗?",是,否
if errorlevel 100 goto main
if errorlevel 2 goto main
set scd=%tcd%
goto main
:help
wbat pal ! cls ! fill 4,4 (18,74) (black on +brown)
set Wtexthi=blue on +brown
wbat text 2,4 @%ramd%\dic.dic:_dr_help ! text 24,4 @%ramd%\dic.dic:copyright
set Wtexthi=
wbat box 20,54 确定,取消
if errorlevel 100 goto main
if errorlevel 2 goto end
if errorlevel 1 goto main
goto end
:cancel
wbat box (+white on +red) @%ramd%\dic.dic:cancel #2
if errorlevel 100 goto main
if errorlevel 2 goto main
if errorlevel 1 goto end
goto end
:brown
echo brown
goto end
:load
if %sfile%*==* goto check1
echo %sfile% |find /i "." >NUL
if errorlevel 1 goto check2
if %wcb1%*==1* if %spr%*==* goto check3
if %wcb2%*==1* if %scd%*==* goto check4
if %wcb1%*==1* if %wcb2%*==1* echo %spr% |find /i "%scd%" >NUL
if errorlevel 1 goto check5
goto checked
:check1
wbat box(+white on +red) "未输入文件完整路径!",确定
if errorlevel 100 goto main
goto main
:check2
wbat box(+white on +red) "文件名不正确!",确定
if errorlevel 100 goto main
goto main
:check3
wbat box(+white on +red) "未输入参数!",确定
if errorlevel 100 goto main
goto main
:check4
wbat box(+white on +red) "未输入光驱名!",确定
if errorlevel 100 goto main
goto main
:check5
wbat box(+white on +blue) @%ramd%\dic.dic:_dr_nscd #2
if errorlevel 100 goto main
if errorlevel 2 goto main
if errorlevel 1 goto checked
goto main
:checked
echo 此处加载驱动!
:cmdload
set flag=
strings sname=filename %1
loadsys /l |find /i "%sname%" >NUL
if not errorlevel 1 loadsys /u %1 >NUL
if %2*==/u* goto end
loadsys /xd /s %ramd%\drivers\%1 %2 %3 %4 %5 %6 %7 %8 %9 >NUL
loadsys /l |find /i "%sname%" >NUL
if not errorlevel 1 set flag=1
goto end