Script for setting IP addresses quickly

Source: Internet
Author: User
1 @ echo off 2 CLS 3 :: set Name = "Local Connection" 4 set name = "wireless network connection" 5 set IP = 192.168.1.55 6 set mask = 255.255.255.0 7 set gateway = 192.168.1.1 8 set dns1 = 42.120.21.30 9 set dns2 = 114.114.114.11410 11 echo.12 echo automatically obtains the IP address. Press 113 echo.14 echo to manually set the IP address. Press 215 16 set/p key = [your choice is:] 17 if % key % = 1 goto one18 if % key % = 2 goto two 19 20: two21 echo you have selected to manually set the IP address. 22 echo. 23 netsh interface IP Set address name = % name % static % IP % mask % gateway % 24 netsh interface IP Set DNS % name % dns1 % Index = 125 netsh interface IP Set DNS % name % dns1 % Index = 226 The echo IP address has been set and modified, press any key to close this window 27 pause28 exit29 30: one31 echo. You have chosen to automatically obtain the IP address. 32 echo. 33 netsh interface IP Set address name = % name % dhcp34 netsh interface IP Set DNS % name % dhcp35 36: netsh interface IP add DNS % name % dns1 % Index = 137 :: netsh interface IP add DNS % name % dns1 % Index = 238 39 echo IP address has been set and modified. Press any key to close this window 40 pause41 exit

 

Script for setting IP addresses quickly

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.