Batch Processing code for quick IP Address Setting using bat in Windows xp/7

Source: Internet
Author: User

In Windows xp/7, use bat to quickly set the IP address of the batch processing code @ Save the following bat, you can use it. @ echo off echo ip is being configured. Please wait... set name = "Local Connection" set ipaddress = 1.2.3.4set mask = 255.255.255.0set gateway = 1.2.3.4set dns = 1.2.3.4set wins = 1.2.3.4 echo is configuring % name %. Please wait... echo is configuring preferred DNS: % dns %... netsh interface ip set dns name = "Local Connection" source = static addr = % dns % echo configuring backup DNS: % wins %... netsh interface ip add dns "Local Connection" addr = % wins % index = 2 echo is configuring ip, mask, and gateway: % Ipaddress % mask % gateway %... netsh interface ip set address name = % name % source = static addr = % ipaddress % mask = % mask % gateway = % gateway % echo ip configured successfully! When echo. & pause uses bat to configure win ip, an alarm is triggered in the dns phase: the configured DNS server does not exist or is incorrect. The solution is to put the DNS setting code before the ip address. It is estimated that the ip address has been set up first, and it will be lost when looking for the dns. If you have time, study it carefully.
 

Related Article

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.