One-click IP Address Setting (quick IP Address Setting)

Source: Internet
Author: User
Tags get ip
Use a batch file to set the IP address. If the IP address is set to 192.168.1.8 subnet mask to 255.255.255.0 gateway as 192.168.1.1 primary DNS to 202.96.128.68 backup DNS to 202.96.128.166, you only need to copy the following file content to a notepad, change the extension. bat, run this bat file: echo off
CLS
Title set IP
ECHO is setting IP address. Please wait ......
Netsh interface IP Set address "Local Connection" static 192.168.1.8 255.255.255.0 192.168.1.1 1
ECHO is changing DNS settings. Please wait ......
Netsh interface IP Set DNS "Local Connection" static 202.96.128.68 primary
Netsh interface IP add DNS name = "Local Connection" ADDR = 202.96.128.166
Echo ****** congratulations! The modification is complete! ******
Pause clear IP Address Settings, set to automatically get IP Address: echo off
CLS
Title clear ipsettings
ECHO is clearing the IP address. Please wait ......
Netsh interface IP Set address name = "Local Connection" Source = DHCP
ECHO is clearing DNS settings. Please wait ......
Netsh interface IP Set DNS name = "Local Connection" Source = DHCP
Echo deletes the ipsettings and sets it to automatic.
Echo **************** congratulations, the command is successfully completed! *************
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.