- :Netsh_Interface_Show_Interface
- set "Netsh_N="&&for /f "skip=3 tokens=1-3,* delims= " %%w in ('"Netsh.exe Interface Show Interface"')do set/a "Netsh_N+=1"&&for /f %%n in ('"call echo,%%Netsh_N%%"')do set "Netsh_Connect_%%n=%%w %%x %%y %%z"
- for /f "tokens=1,* delims==" %%i in ('set Netsh_Connect_')do for /f "tokens=1-3,* delims= " %%w in ("%%j")do (
- Netsh.exe interface Ip Set Address Name="%%z" Source=dhcp
- Netsh.exe interface Ip Set DnsServers Name="%%z" Source=dhcp
- )
- goto:eof
复制代码
|