Automatically change IP addresses in batches

Source: Internet
Author: User

Because different IP addresses are used in different networks, it is very difficult to manually set each time, and write a batch. As follows:


@ Title wireless network setting to 251

@ REM modify the DOS window color
@ Color 0b
@ Echo off

@ REM set Internet network parameters
Set Nic = "wireless network connection"
Set IP = ""
Set mask = ""
Set GW = ""
Set DNS = ""
Set GM = 1

@ ECHO is modifying the network configuration to the Internet IP address, Gateway 251...
@ Netsh interface IP Set address name = % Nic % source = static ADDR = % IP % mask = % mask % gateway = % GW % gwmetric = % GM %
@ ECHO: Set DNS to Internet DNS (% DNS % )...
@ Netsh interface IP Set DNS name = % Nic % source = static ADDR = % DNS %
@ ECHO: Set successfully.

MSG % username %/Time: 2 congratulations, % Nic % set successfully!


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: 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.