netsh 是一个不错的东西!!!还有很多应用!!!
  假设你有一台笔记本,装有win2000/xp,经常在家与公司之间移动,两个地方需要不同的网络配置,每次改来改去实在麻烦,因此想找一个偷懒的办法,最后一次搞定,简单省事.下面就是一个好的办法. 
  1.将你的机器设置成在公司中使用的网络配置,打开命令行,使用如下命令: 
  netsh -c interface dump >c:\gs.txt 
  2.将你的机器设置成在家中使用的网络配置,打开命令行,使用如下命令: 
  netsh -c interface dump >c:\jia.txt 
  3.以后,将你回到公司要使用公司的配置时,使用如下命令: 
  netsh -f c:\gs.txt 
  回到家要使用家中的配置时,使用如下命令: 
  netsh -f c:\jia.txt 
  4.如果还觉得麻烦,那干脆搞个批处理好了. 
  txt如下:  #========================  # 接口配置  #========================  pushd interface 
  reset all 
 
  popd  # 接口配置结束 
 
  # ----------------------------------  # 接口 IP 配置  # ----------------------------------  pushd interface ip 
 
  # "本地连接 2" 的接口 IP 配置 
  set address name = "本地连接 2" source = static addr = 192.168.0.40 mask = 255.255.255.0  set address name = "本地连接 2" gateway = 192.168.0.1 gwmetric = 1  set dns name = "本地连接 2" source = static addr = 192.168.0.40  add dns name = "本地连接 2" addr = 192.168.0.1  set wins name = "本地连接 2" source = static addr = none 		 |