zoukankan      html  css  js  c++  java
  • PC网络配置切换脚本(IP地址切换脚本)

    1、设置IP地址为静态地址:(set.cmd )


    @echo off 
    netsh interface ip set address name="本地连接" source = static addr=192.168.0.24  mask=255.255.255.0 gateway=192.168.0.1 gwmetric=auto  
    rem netsh interface ip set dns name="本地连接" source=static addr=202.96.128.86 register=primary 
     
    netsh interface ip set dns 本地连接 static 202.96.128.86 primary 
    netsh interface ip add dns 本地连接 202.96.128.166 index=2 
     
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f 

    2、设置IP地址为自动获取(dhcp.cmd)

    @echo off 
    netsh interface ip set address name="本地连接" source=dhcp 
     
    netsh interface ip set dns name="本地连接" source=dhcp 
     
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f 
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "gzproxy.ip.com:8080" /f 
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "localhost;10.*;*.ip.com" /f 

     
     
     
  • 相关阅读:
    hdu2328 Corporate Identity
    hdu1238 Substrings
    hdu4300 Clairewd’s message
    hdu3336 Count the string
    hdu2597 Simpsons’ Hidden Talents
    poj3080 Blue Jeans
    poj2752 Seek the Name, Seek the Fame
    poj2406 Power Strings
    hust1010 The Minimum Length
    hdu1358 Period
  • 原文地址:https://www.cnblogs.com/lihuanhuan/p/10612154.html
Copyright © 2011-2022 走看看