|
@ECHO OFF
if not "%windir%*"=="*" goto Error
if "%2*"=="*" goto Sample
if "%1"=="RTL8100" goto RTL8100
if "%1"=="RTL8139" goto RTL8139
if "%1"=="DLE530TX" goto DLE530TX
if "%1"=="DFE530TX" goto DFE530TX
if "%1"=="DCN530TX" goto DCN530TX
if "%1"=="PRO100" goto PRO100
if "%1"=="IP100" goto IP100
if "%1"=="RTL8029" goto RTL8029
if "%1"=="VIA" goto VIA
if "%1"=="SIS" goto SIS
if "%1"=="3C90X" goto 3C90X
goto Sample
:Sample
echo.
echo Usage: NG Ethernet_Adapter IP_Address
echo Sample: NG RTL8139 1.1 ; Realtek RTL8139 Family, 192.168.1.1
echo NG PRO100 DHCP ; Intel PRO/100, DHCP
echo.
echo Ethernet_Adapter: Realtek RTL8139 Family = RTL8139
echo Legend DFE-530TX = DLE530TX
echo D-Link DFE-530TX = DFE530TX
echo DigitalChina DCN-530TX = DCN530TX
echo Intel PRO/10/100 = PRO100
echo IC Plus IP100 = IP100
echo Realtek RTL8029 = RTL8029
echo VIA Rhine Family = VIA
echo SiS 900/7016 = SIS
echo 3Com 3C90x EtherLink = 3C90X
goto End
:Error
echo.
echo Error!
echo This is GhostCast for DOS.
echo Please exit Windows and boot to DOS.
goto End
:RTL8100
rem - Realtek RTL8100 Family
NIC\RTL8100\RTSNT.COM 0x60
goto IP
:RTL8139
rem - Realtek RTL8139 Family
NIC\RTL8139\RTSPKT.COM 0x60
goto IP
:DLE530TX
rem - Legend DFE-530TX
NIC\DLE530TX\DLKFET.COM 0x60
goto IP
:DFE530TX
rem - D-Link DFE-530TX
NIC\DFE530TX\DLKFET.COM 0x60
goto IP
:DCN530TX
rem - DigitalChina DCN-530TX
NIC\DCN530TX\DCNPKT.COM 0x60
goto IP
:PRO100
rem - Intel PRO/100
NIC\PRO100\E100BPKT.COM 0x60
goto IP
:IP100
rem - IC Plus IP100
NIC\IP100\IP100PD.COM 0x60
goto IP
:RTL8029
rem - Realtek RTL8029
NIC\RTL8029\PCIPKT.COM 0x60
goto IP
:VIA
rem - VIA Rhine Family
NIC\VIA\FETPKT.COM 0x60
goto IP
:SIS
rem - SiS 900/7016
NIC\SIS\SIS900.EXE -n 0x60
goto IP
:3C90X
rem - 3Com 3C90x EtherLink
NIC\3C90X\3C90XPD.COM /I=0x60
goto IP
:IP
if exist WATTCP.CFG del WATTCP.CFG
if "%2"=="DHCP" goto GHOST
echo IP = 192.168.%2>> WATTCP.CFG
echo NETMASK = 255.255.255.0>> WATTCP.CFG
echo GATEWAY = >> WATTCP.CFG
goto GHOST
:GHOST
echo.
GHOST.EXE -ja=CW
goto Uninstall
:Uninstall
echo.
if exist WATTCP.CFG del WATTCP.CFG
if "%1"=="RTL8139" goto RTL8139U
if "%1"=="DLE530TX" goto DLE530U
if "%1"=="DFE530TX" goto DFE530U
if "%1"=="DCN530TX" goto DCN530U
if "%1"=="PRO100" goto PRO100U
if "%1"=="IP100" goto IP100U
if "%1"=="RTL8029" goto RTL8029U
if "%1"=="VIA" goto VIAU
if "%1"=="SIS" goto SISU
if "%1"=="3C90X" goto 3C90XU
:RTL8139U
rem - Realtek RTL8139 Family
NIC\RTL8139\RTSPKT.COM -u
goto End
:DLE530U
rem - Legend DFE-530TX
NIC\DLE530TX\DLKFET.COM /u
goto End
:DFE530U
rem - D-Link DFE-530TX
NIC\DFE530TX\DLKFET.COM -u
goto End
:DCN530U
rem - DigitalChina DCN-530TX
NIC\DCN530TX\DCNPKT.COM -u
goto End
:PRO100U
rem - Intel PRO/100
NIC\PRO100\E100BPKT.COM -u
goto End
:IP100U
rem - IC Plus IP100
NIC\IP100\IP100PD.COM /u
goto End
:RTL8029U
rem - Realtek RTL8029
NIC\RTL8029\PCIPKT.COM -u
goto End
:VIAU
rem - VIA Rhine Family
NIC\VIA\FETPKT.COM -u
goto End
:SISU
rem - SiS 900/7016
echo SiS 900/7016 Packet Driver can't uninstall.
goto End
:3C90XU
rem - 3Com 3C90x EtherLink
NIC\3C90X\3C90XPD.COM -u /I=0x60
goto End
:End
echo.
以上是全程序,为何我运行后此批处理后没运行ghost,
if not "%windir%*"=="*" goto Error /"%windir%*"=="*" 如何理解*/
if "%2*"=="*" goto Sample /*"%2*"=="RTL8100"如何理解*/
if "%1"=="RTL8100" goto RTL8100 /*"%2*"=="RTL8139"又是如何理解*/
if "%1"=="RTL8139" goto RTL8139
主要是前几行有些看不明白,见语句后面/**/注释,请高手指点一下,以上批处理文件要如何才会能运行ghost.exe呢,谢谢,希望能详细点了,感激涕零!~~~ |
|