IP address change script tool, dedicated to super-complex coders in the Network Environment

Source: Internet
Author: User
Tags echo 7

The IP address change script tool is dedicated to super-complex coders in the network environment. IP address change is a headache for gamers who often travel through different locations and are in a complex network environment, for example, during my previous period, the code was written to the Telecom broadband and wired wireless areas. Maybe there would be a fault. If I got back to my home, I could still choose the China Telecom, back to the company, China Unicom broadband and wired networks are sometimes bound to IP addresses and MAC addresses, and ports are also bound. wireless networks are often very poor, and sometimes goagent is required to climb the wall, sometimes you may not want to enable both wired and wireless... Www.2cto.com CIDR Block is a variety of strange wonders, and DNS cannot be remembered. Fortunately, with this script, changing IP addresses becomes a kind of enjoyment ~~, Haha, it's much easier to streamline or modify the following code into what you need and save it as ip. bat on the desktop ~ Www.2cto.com C code @ echo off @ rem sets the proxy server address to be used ==================== ===== set ProxyServerValue = 127.0.0.1: 8087 @ rem does not need to use the proxy server address. Note: ", <local>" indicates the address that is not needed for activation. set ProxyOverrideValue = "10. *, <local> "@ rem ======================================== ===================================: menu cls echo. echo ipsetting script (Case Insensitive) echo ======================================== echo 1: wireless Automatic echo 2: Wireless Public Security echo 3: wired Automatic echo 4: wired dormitory echo 5: wired public security echo 6: wired Xiaoshan echo 7: Wireless dormitory echo 8: wireless Xiaoshan echo ====================================== echo P: set proxy echo N: Cancel proxy echo EB: Enable local connection echo DB: Disable local connection echo EW: enable wireless connection echo DW: Disable wireless connection echo Q: Exit echo. @ echo off set/p input = select the Internet location and press Enter: www.2cto.com if "% input %" = "1" goto IP_1 if "% input %" = "2" goto IP_2 if "% input %" = "3" goto IP_3 if "% input %" = "4" goto IP_4 if "% input %" = "5" goto IP_5 if "% input %" = "6" goto IP_6 if "% input %" = "7" goto IP_1 if "% input %" = "8" goto IP_1 if "% input %" = "p" goto IP_P if" % input % "=" P "goto IP_P if" % input % "=" n "goto IP_N if" % input % "=" N "goto IP_N if" % input % "=" eb "goto IP_EB if" % input % "=" EB "goto IP_EB if" % input % "=" db "goto IP_DB if" % input % "=" DB "goto IP_DB if" % input % "=" ew "goto IP_EW if" % input % "=" EW "goto IP_EW if" % input % "=" dw "goto IP_DW if" % input % "=" DW "goto IP_DW if" % input % "=" Q "exit if" % input % "= "= "q" exit: IP_1 netsh interface ip set address "wireless network connection" dhcp netsh interface ip set dnsservers "wireless network connection" dhcp goto end: IP_2 netsh interface ip set address "wireless network connection" static 192.168.170.221 255.255.255.0 192.168.170.1 netsh interface ip set dnsservers "wireless network connection" static 221.228.255.1 primary yes goto end: IP_3 netsh interface ip set address "Local Connection" dhcp netsh interface ip set dnsservers "Local Connection" dhcp goto end: IP_4 netsh interface ip set address "Local Connection" static 192.168.1.106 255.255.255.0 192.168.1.1 netsh interface ip set dnsservers "Local Connection" static 221.228.255.1 primary yes goto end: IP_5 netsh interface ip set address "Local Connection" static 192.168.168.221 255.255.255.0 192.168.168.1 netsh interface ip set dnsservers "Local Connection" static 221.228.255.1 primary yes goto end: IP_6 netsh interface ip set address "Local Connection" static 192.168.1.85 255.255.255.0 192.168.1.254 netsh interface ip set dnsservers "Local Connection" static 221.6.4.66 primary yes goto end @ rem ========== ========================================================== ==================: IP_P reg add "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings"/v ProxyServer/t reg_sz/d % ProxyServerValue %/f reg add "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings "/v ProxyOverride/t reg_sz/d % ProxyOverrideValue %/f reg add" HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings "/v ProxyEnable/t reg_dword/d 00000001/f goto end @ rem ============================ =====================================: IP_N reg add "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings"/v ProxyEnable/t reg_dword/d 00000000/f goto end: IP_EB netsh interface set interface name = "Local Connection" admin = ENABLED goto end: IP_DB netsh interface set interface name = "Local Connection" admin = DISABLED goto end: IP_EW netsh interface set interface name = "wireless network connection" admin = ENABLED goto end: IP_DW netsh interface set interface name = "wireless network connection" admin = DISABLED goto end: end goto menu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.