1、_SUB 主界面 ,W525H470,查看网卡信息 - by lmle,CALL UnMouALL,#1GROU GrouDir,L10T12W291H55,指定目标系统 Windows 文件夹EDIT SystemDir,L19T37W211H18,C:Windows,CALL CheckFile,0ITEM 浏览按钮,L240T34W53H24,浏 览,CALL BrowseFile,0GROU GrouTips,L312T12W197H55,温馨提示LABE -left LabeTips,L346T39W160H16,0,CALL DoLoop_AFIND $%NIC_Sum%=1,TE
2、AM ENVI ListLJMC.DEL=1.%LJM1%|ENVI ListLJMC.ADDSEL=%LJM1%|ShowIP|EXIT _SUBFIND $%NIC_Sum%1,ENVI ListLJMC.SEL=1.%LJM1%ShowIP_END _SUB DoLoop_AREAD %temp%wangka.reg,%ReadLine%,CurLineMSTR ID=16,38,%CurLine%RSTR IDisOK=1,%ID%FIND $%IDisOK%=,CALL IsNICENVI Number=%NIC_Sum%CALL GetInfoCALC #ReadLine=%Rea
3、dLine%-1_END_SUB ShowInfo_BENVI LabeWeizhi=HKLMSystem%ControlSetNumber%ServicesTcpipParametersAdaptersFIND $%MouSysOK%=0,CALL MountSystemFIND $%MouSoftOK%=0,FIND $%S_Err%=0,CALL MountSoftFILE %temp%wangka.txtENVI ListLJMC=EXEC =!CMD.EXE /C “reg query “HKLM%SystemLJ%ControlSetNumber%ServicesTcpipPara
4、metersAdapters“ %temp%wangka.txt“READ %temp%wangka.txt,-1,LastLineCALC #LastLine=%LastLine%+1ENVI NIC_Sum=0ENVI ReadLine=1LOOP #%ReadLine%1,ENVI ListLJMC.SEL=1.%LJM1%ShowIP_END _SUB DoLoop_BREAD %temp%wangka.txt,%ReadLine%,CurLineRSTR ID=38,%CurLine%RSTR IDisOK=1,%ID%FIND $%IDisOK%=,CALL IsNICENVI N
5、umber=%NIC_Sum%CALL GetInfoCALC #ReadLine=%ReadLine%+1_END_SUB ShowInfo_CENVI LabeWeizhi=HKLMSystem%ControlSetNumber%ControlNetwork4D36E972-E325-11CE-BFC1-08002BE10318FIND $%MouSysOK%=0,CALL MountSystemFIND $%MouSoftOK%=0,FIND $%S_Err%=0,CALL MountSoftFILE %temp%wangka.txtENVI ListLJMC=EXEC =!CMD.EX
6、E /C “reg query “HKLM%SystemLJ%ControlSetNumber%ControlNetwork4D36E972-E325-11CE-BFC1-08002BE10318“ %temp%wangka.txt“READ %temp%wangka.txt,-1,LastLineCALC #LastLine=%LastLine%+1ENVI NIC_Sum=0ENVI ReadLine=1LOOP #%ReadLine%1,ENVI ListLJMC.SEL=1.%LJM1%ShowIP_END _SUB IsNICCALC NIC_Sum=%NIC_Sum%+1CALC
7、NextLine=%ReadLine%+1ENVI NIC%NIC_Sum%NIC_ID=%ID%ENVI LJM%NIC_Sum%=%REGI $HKLM%SystemLJ%ControlSetNumber%ControlNetwork4D36E972-E325-11CE-BFC1-08002BE10318%NIC%NIC_Sum%NIC_ID%Connectionname,LJM%NIC_Sum%ENVI LJM_NIC_Sum=LJM%NIC_Sum%LSTR NameOK=1,%LJM_NIC_Sum% FIND $%NameOK%=%,TEAM CALC NIC_Sum=%NIC_S
8、um%-1|EXIT _SUB LPOS NameOK=*,1,%LJM_NIC_Sum%FIND $%NameOK%0,TEAM CALC NIC_Sum=%NIC_Sum%-1|EXIT _SUBLPOS NameOK=,1,%LJM_NIC_Sum%FIND $%NameOK%0,TEAM CALC NIC_Sum=%NIC_Sum%-1|EXIT _SUBENVI &i=0LOOP %&i%0,ENVI 保存按钮.Enable=1LSTR OKProductName=1,%ProductName%FIND $%OKProductName%=%,!ENVI GrouShow=网卡相关信息
9、 目标系统:%ProductName%ENVI Number=0LOOP #%Number%0,IFEX $%&CanShuSum%=3,ENVI OutStr=%OutStr%StrAAA%i%&HuanHang%IFEX $%&CanShuSum%=4,STRL SpaceLen=%StrAAA%i%CALC SpaceLen=30 - %SpaceLen%ENVI$ SP=*%SpaceLen% 0x20 ENVI OutStr=%OutStr%StrAAA%i%SP%StrBBB%i%&HuanHang%CALC i=%i% + 1CALC StrSum=%StrSum% - 1STR
10、L &OutStrLen=%OutStr%CALC &OTLen=%&OutStrLen% - %&HuanHangLen%LSTR OutStr=%&OTLen%,%OutStr%_END_SUB GetStrENVI &OldStr=%1ENVI &StrName=%2ENVI &HuaFen=%3STRL &HuaFenLen=%&HuaFen%ENVI StrSum=0STRL &Len=%&OldStr%IFEX $%&Len%0,CALC &StrLen=%&StrEnd%-%&StrStart%CALC StrSum=%StrSum% + 1MSTR %&StrName%StrS
11、um%=%&StrStart%,%&StrLen%,%&OldStr%CALC &i=%&i% + 1LPOS* &StrEnd2=%&HuaFen%,%&i%,%&OldStr%IFEX $%&StrEnd2%=0,CALC &MoWei=%&Len%-%&StrEnd%IFEX $%&MoWei%6,CALC StrSum=%StrSum% + 1CALC &StrStart=%&StrEnd% + %&HuaFenLen%CALC &StrLen=%&Len% - %&StrStart% + 1MSTR %&StrName%StrSum%=%&StrStart%,%&StrLen%,%&
12、OldStr%TEAM ENVI &TuiChu=1|EXIT LOOPCALC &StrEnd2=%&StrEnd2% - %&HuaFenLen%IFEX $%&StrEnd%=%&StrEnd2%,TEAM ENVI &TuiChu=1|EXIT LOOPCALC &StrStart=%&StrEnd% + %&HuaFenLen%IFEX $%&TuiChu%=1,EXIT LOOP_END_SUB SaveFileBROW SaveName,&,保存网卡信息 ,txtLSTR ChooseCancel=1,%SaveName%FIND $%ChooseCancel%=%,EXIT _
13、SUBIFEX %SaveName%,TEAM MESS %SaveName%文件已存在!请重新选择。错误#ok*8000|EXIT _SUBFIND $%OKProductName%=%,!WRIT %SaveName%,$+0,目标系统是 %ProductName%WRIT %SaveName%,$+0,目标系统下共有%NIC_Sum%块网卡WRIT %SaveName%,$+0,IFEX %SaveName%,!TEAM MESS %SaveName%不可写或磁盘已满!请重新选择。错误 #ok*8000|EXIT _SUBENVI Number=0LOOP #%Number%NIC_Su
14、m%,CALL WriteFileMESS “%SaveName%”保存完毕!保存网卡信息 #ok*5000_END _SUB WriteFileCALC #Number=%Number%+1WRIT %SaveName%,$+0,第%Number%块网卡WRIT %SaveName%,$+0,连接名称:%LJM%Number%WRIT %SaveName%,$+0,网卡描述:%NIC%Number%Description%WRIT %SaveName%,$+0,设 IP 方式:%EnDHCP%Number%FIND $%EnDHCP%Number%=自动获取,TEAM WRIT %SaveN
15、ame%,$+0,|EXIT _SUBWRIT %SaveName%,$+0,IP 地 址:ENVI IPN=IP%Number%ENVI SubnetMaskN=SubnetMask%Number%LinkStr %IPN% %SubnetMaskN% 0FIND $=%OutStr%,WRIT %SaveName%,$+0,( 空 )!WRIT %SaveName%,$+0,%OutStr%WRIT %SaveName%,$+0,默认网关:ENVI GatewayN=Gateway%Number%LinkStr %GatewayN% 0FIND $=%OutStr%,WRIT %SaveN
16、ame%,$+0,( 空 )!WRIT %SaveName%,$+0,%OutStr%WRIT %SaveName%,$+0,DNS 地址:ENVI DNSN=DNS%Number%LinkStr %DNSN% ,FIND $=%OutStr%,WRIT %SaveName%,$+0,( 空 )!WRIT %SaveName%,$+0,%OutStr%WRIT %SaveName%,$+0,_END _SUB InitListENVI ListLJMC=ENVI EditWKMS=ENVI EditWKSL=ENVI EditIPDZ=ENVI EditMRWG=ENVI EditDNS=ENVI 保存按钮 .Enable=0ENVI S_Err=0ENVI Radi_A.enable=1ENVI GrouShow=网卡相关信息 目标系统:未知ENVI SystemLJ=_SYSTEM_ENVI SoftwareLJ=_SOFTWARE_ENVI MouSysOK=0ENVI MouSoftOK=0ENVI NIC_Sum=0_END CALL 主界面