|
6#
楼主 |
发表于 2014-1-16 08:52:12
|
只看该作者
加载网络驱动时, 有个奇怪现象. 我的台式机是780G主板集成网卡. 第一次U启成功驱动了网卡(手动加载), 但之后再试U启自动加载网卡驱动(我不做选择, 只是等待读秒结束, 默认应是从cab读取驱动), 就再也没有加载成功过, 都是"通知: 无法读取网卡信息.... 是否尝试用其他方式安装网卡驱动?"
于是我另外下载了与此配套的net.cab, 把它和INST_NET.INI放在一起. U启还是无法读取. 然后把net.cab改名为DRIVERS_NET.CAB, 这次U启成功加载了网卡(看到配置窗口了), 但之后马上弹出窗口"请选择您的CAB驱动包:...cab"
我的目的: 假定我的主板不在驱动范围内, 就借助net.cab. 但最后弹出的cab文件选择窗口又画蛇添足了, 怎么去掉? 如下的代码没看懂呢...
\MYDRIVER\INST_NET.INI内容如下:
- _SUB netset
- TIPS 网络初始化,正在启动服务……,10000,4,SHELL32.DLL#1
- EXEC =!netcfg.exe -v -winpe
- EXEC =!netcfg.exe -c s -i MS_Server
- EXEC =!netcfg.exe -e -c p -i MS_NDISWAN
- EXEC =!netcfg.exe -e -c s -i MS_RASMAN
- EXEC =!netcfg.exe -e -c p -i MS_PPPOE
- EXEC =!netcfg.exe -e -c p -i MS_NDISUIO
- EXEC =!netcfg -c s -i ms_nativewifip
- EXEC =!net start dot3svc
- EXEC =!net start Wlansvc
- EXEC =!netcfg -e -c p -i ms_nwipx
- //网络状态指示
- SERV wcmsvc
- SERV nlasvc
- //支持远程桌面
- SERV audiosrv
- _END
- _SUB yxwl
- call netset
- TIPS 正在提取网卡驱动,请等待弹出提示……,10000,4,SHELL32.DLL#1
- DEVI $DRIVERS_NET.CAB,,%Temp%
- //FILE %CurDir%\DRIVERS_NET.CAB
- _END
- _SUB wxwl
- IFEX %windir%\system32\wlanext.exe,Call netset!Call wxmk
- TIPS 正在提取无线网卡驱动,请等待弹出提示……,10000,4,SHELL32.DLL#1
- DEVI $DRIVERS_NET_WIRELESS.CAB,,%Temp%
- //FILE %CurDir%\DRIVERS_NET_WIRELESS.CAB
- _END
- _SUB all
- IFEX %windir%\system32\wlanext.exe,Call netset!Call wxmk
- TIPS 正在提取网卡驱动,请等待弹出提示……,10000,4,SHELL32.DLL#1
- DEVI $DRIVERS_NET*.CAB,,%Temp%
- //FILE %CurDir%\DRIVERS_NET*.cab
- _END
- _SUB zdywl
- IFEX %windir%\system32\wlanext.exe,Call netset!Call wxmk
- IFEX U:,Envi RP=U:!Envi RP=%Desktop%
- BROW Tag,%RP%\*.cab,请选择您的CAB驱动包:,cab
- FIND $%Tag%=,!Call handcab
- _END
- _SUB handcab
- TIPS 正在提取网卡驱动,请等待弹出提示……,10000,4,SHELL32.DLL#1
- PATH %Temp%
- DEVI %Tag%,,%Temp%
- _END
- _SUB wlmk
- TIPS 开始解压网络模块,可能需要几分钟时间……,50000,4,SHELL32.DLL#1
- EXEC =!CMD.EXE /C "7z.exe x NET_PART.7z -y -aos -o"%windir%""
- EXEC =!CMD.EXE /C "7z.exe x Pppop.7z -y -aos -oX:"
- EXEC =!CMD.EXE /C "7z.exe x ShareServer.7z -y -aos -o"%windir%""
- EXEC =!CMD.EXE /C "7z.exe x Opera.7z -y -aos -o"%ProgramFiles%""
- //FILE --M %CurDir%\NET_PART.7z;%CurDir%\Pppop.7z;%CurDir%\ShareServer.7z;%CurDir%\Opera.7z
- Call windows
- _END
- _SUB wxmk
- TIPS 正在解压无线模块,请稍等……,10000,4,SHELL32.DLL#1
- EXEC =!CMD.EXE /C "7z.exe x Wireless.7z -y -aos -o"%windir%""
- //FILE %CurDir%\Wireless.7z
- Call netset
- _END
- _SUB DRVALL
- IFEX %windir%\system32\ncpa.cpl,Call windows!Call wlmk
- _END
- _SUB windows
- FIND $%ms%=有线,TEAM call yxwl
- FIND $%ms%=无线,call wxwl
- FIND $%ms%=,call all
- FIND $%ms%=自定义,call zdywl
- TEMP @Delete
- call kjfs
- _END
- _SUB BUTTON2
- ENVI @t1=0
- KILL \%setms%
- find $%radi1.check%=1,envi ms=有线
- find $%radi2.check%=1,envi ms=无线
- find $%radi3.check%=1,envi ms=
- find $%radi4.check%=1,envi ms=自定义
- Exec =!cmd /c "echo Envi ms=%ms%>%windir%\ms.ini"
- ifex $%Radio2.check%=1,TEAM exec =pecmd load "%Curdir%\gpd.ini"|call kjfs
- ifex $%Radio1.check%=1,CALL DRVALL
- _END
- _SUB setms,w228h230,安装网卡驱动
- LABE LABE1,L10T10W160H20,请选择安装方式和网卡类型:,,0x6F0000
- RADI Radio1,l15t25w120h20,通过CAB包安装,,1,1
- radi radi1,l35t42w42h22,有线,,1
- radi radi2,l100t42w42h22,无线
- radi radi3,l35t65w42h22,全部
- radi radi4,l100t65w92h22,自定义网卡包
- radi Radio2,l15t90w160h30,利用本地资源安装,,0,1
- ENVI I=10
- LABE LB,L79T148W70H20,--%I%--,,0x800000
- TIME TIMER0,1000,TEAM CALC I=%I% - 1|ENVI @LB=--%I%--
- time t1,10000,call BUTTON2
- ITEM BUTTON1,L80T170W70H24,确认,call BUTTON2,,0
- LABE LABE2,L10T125W200H20,点“确认”开始安装(10秒倒计时)!,,0xC6
- _END
- IFEX %WinDir%\system32\ncpa.cpl,Call zdywl!Call @setms
- _SUB kjfs
- LOAD \TOOLS\NET.INI
- REGI HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{8E908FC9-BECC-40f6-915B-F4CA0E70D03D}\=Network Center
- REGI HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowNetPlaces=#1
- REGI HKLM\SOFTWARE\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\ShellFolder\Attributes=#2953052260
- //以下为判断网卡是否正确安装代码
- ENVI &®data=
- ENVI &&NUM=0
- LOOP #%&NUM% <= 200, //够大的
- {
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\%&NUM%\ServiceName,®data
- CALC &NUM=%&NUM% + 1
- FIND $X=X%®data%,! ENVI &NUM=99999 //OK
- }
- ENVI &&YESNO= //清除
- FIND $%®data%=,MESS ▉ 是否尝试用其他方式安装网卡驱动? @ 通知:无法读取网卡信息! #YN *0 $Y!EXEC %Windir%\PENetwork\PENetwork.exe
- FIND $%&YESNO%=YES,TEAM Call ZDY
- FIND $%&YESNO%=NO,EXIT 1
- KILL EXPLORER.EXE
- TIPS 网络初始化,完成!,5000,4,SHELL32.DLL#1
- _END
复制代码 |
|