One-click Automatically change native IP address BAT execution scripts are very handy _dos/bat

Source: Internet
Author: User

Please copy the following script, save as a. bat file, and change the subnet mask, gateway, IP,DNS, etc. into your

The following code has limitations: In fact, only set 192.168.1.* (2-254), if your IP is something else, you need to modify the code in the 192.168.1.1 switch to your gateway

Copy Code code as follows:

cd\
Cls
@echo off
Color A
: Start
set/p myip= "Please enter an administrator-assigned IP:"
Cls
echo, your IP address is%myip%.
Pause
Color F
Cls
ECHO is modifying your IP address, if there is a firewall eject, please set allow execution, please wait ...
netsh interface ip set address name= "Local Area Connection" Source=static addr=%myip% mask=255.255.255.0
Cls
ECHO is configuring your gateway, if there is a firewall eject, please set allow execution, please wait a moment ...
netsh interface ip set address name= "Local Area Connection" gateway=192.168.1.1 gwmetric=1
Cls
ECHO is configuring your DNS, if there is a firewall eject, please set allow execution, please wait a moment ...
netsh interface ip set DNS name= "Local Area Connection" Source=static addr=192.168.1.1 register=primary
Cls
ECHO is configuring your wins, if there is a firewall eject, please set allow execution, please wait a moment ...
netsh interface ip set wins name= "Local Area Connection" Source=static Addr=none
Cls
ECHO is updating your DNS, please wait a moment ...
Ipconfig/flushdns

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.