How to create a batch file in win7 Ultimate to achieve a quick IP replacement?

  
Why do laptops today design ultrabooks, netbooks, 12-inch, or even 10-inch computers? The reason is simple, because many users need to bring their computers to different places. This notebook design will make it easier and faster for everyone to carry. So, do friends who often carry computer travel have encountered the failure of win7 64-bit Ultimate download can not connect to the network? In fact, many times, because the IP address in win7 Ultimate is at play, usually, we only need to re- Set the IP address in the computer, the problem can be solved, then for friends who travel frequently, if you need to change the IP address often? There is no other way? Below, Xiaobian will introduce an operation skill, how to Create a batch file in win7 Ultimate to achieve a quick IP replacement.
1. First, let's go back to the desktop location of win7 Ultimate, then randomly find a blank space on the desktop, click the right mouse button, and then select New - Text Document.
2. After we double-click to open the newly created text document, then copy the following code into:
@echo off
rem eth //eth is the name of the network card, which can be queried in the network connection, such as ” Local link”
set eth=“wireless network connection"
rem ip //ip for the IP you want to change
set ip=192.168.1.8
rem gw //gw for gateway Address
set gw=192.168.1.1
rem netmasks //netmasks is the subnet mask
set netmasks=255.255.255.0
echo is changing the local IP to: %ip%
Rem
if %gw%==none netsh interface ip set address %eth% static %ip% %netmasks% %gw% 》 nul
if not %gw%==none netsh interface ip set address %eth% Static %ip% %netmasks% %gw% 1 》 nul
echo…………………….
echo Check current native IP:
ipconfig
echo…………………….
Echo successfully changed the local IP to %ip%!
pause
close
After we click on the file - save it as a .bat file, we will run it directly when we want to change the IP. The program is fine.

Copyright © Windows knowledge All Rights Reserved