Originally posted by flyinspace at 2007-5-9 04:30 PM:
@echo off
for /f "tokens=* " %%i in ('ipconfig ^| find /i "def"') do (
for %%a in (%%i) do set "x=%%a"
)
route add 0.0.0.0 mask 0.0.0.0 %x%
pause
不行啊.
C:\Documents and Settings\毛毛虫\桌面>(for %a in (Default Gateway . . . . . . .
) do set "x=%a" )
C:\Documents and Settings\毛毛虫\桌面>set "x=Default"
C:\Documents and Settings\毛毛虫\桌面>set "x=Gateway"
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=."
C:\Documents and Settings\毛毛虫\桌面>set "x=:"
C:\Documents and Settings\毛毛虫\桌面>route add 0.0.0.0 mask 0.0.0.0 :
route: bad gateway address :
C:\Documents and Settings\毛毛虫\桌面>pause
请按任意键继续. . .