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.