Notebook dedicated win7 system to quickly change the IP method

  
                                    

There are more and more users of win7 systems using laptops today. Laptops have the advantage that desktops can't match, that is, they are easy to carry. Users can use the laptop in different places. However, due to the setting of the system IP address, the user will always be unable to connect to the network when using the laptop, but it is troublesome to change the IP frequently. So is there any good way to solve this problem? In fact, we can quickly change the IP through the batch file, the following small series will let you know the specific solution!

The method is as follows:

1, in the win7 system desktop blank, right click on the mouse to select New - text document;

2, double-click to open the new text document, 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 is the IP you want to change

set ip=192.168.1.8

rem gw //gw is the 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 interf Ace ip set address %eth% static %ip% %netmasks% %gw% 1 》 nul

echo…………………….

echo Check the current native IP:

ipconfig

echo…………………….

echo successfully changed the local IP to %ip%!

pause

close

3. Click File - Save as .bat format file .

After saving the .bat file through the above steps, click on the batch file, the laptop will automatically change the IP address, which is convenient for users to use the computer

Note: For more exciting tutorials, please pay attention to the computer tutorial section, computer office group: 189034526 welcomes you to join

Copyright © Windows knowledge All Rights Reserved