Custom batch file for configuring network IP addresses, gateways, and DNS

Source: Internet
Author: User

Custom configuration of network IP, gateway, DNS. bat CopyCodeThe Code is as follows: @ echo off
Set slection1 =
Set/P slection1 = enter the IP Address:
Netsh interface IP Set address name = "Local Connection" Source = static ADDR = % slection1 % mask = 255.255.255.0
Set slection2 =
Set/P slection2 = enter the gateway address:
Netsh interface IP Set address name = "Local Connection" Gateway = % slection2 % gwmetric = 0

Set slection3 =
Set/P slection3 = enter the primary DNS address
Netsh interface IP Set DNS name = "Local Connection" Source = static ADDR = % slection3 % register = primary

Set slection4 =
Set/P slection4 = enter the backup DNS address
Netsh interface IP add DNS name = "Local Connection" ADDR = % slection4 %
Netsh interface IP Set wins name = "Local Connection" Source = static ADDR = none
Pause

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.