How to quickly change the IP address with a .bat file

    Continuing about using Batch Files, if in the previous article you already know a lot about commands in batch files. now you will be taught how to quickly change the ip address by entering the script and we will create a batch file. Its use later to make it easier for you that is just by double clicking the file.

IP address with a .bat


    How to Change the IP Address of a computer manually?

    For those of you who use many IP addresses on your computer for testing purposes and other purposes. to change the ip address takes several steps.

Example :

1. Click Start Windows
2. Click Control Panel
3. Select Network and Sharing Center
4. Change Adapter Settings
5. Double Click Local Area Connection
6. Select Internet Protocol Version 4
7. Enter the IP address
8. Enter the Subnet Mask
9. Enter Default Gateway
10. Enter DNS Server Address
11. If everything is click Save

    With the 11 steps above, you can only change the IP ADDRESS on your computer.
If you want it to be more practical and faster, you can also use a batch file so that to change the ip address on your computer, you simply double click the file that we will create below.


How to Change Computer IP ADDRESS with Batch File

    Please open Notepad on your computer

Then enter the command below:

        netsh int ip set address "Local Area Connection" static 192.168.100.10 255.255.255.0 192.168.100.254
        netsh int ip set dns "Local Area Connection" sta 8.8.8.8
        netsh int ip add dns "Local Area Connection" 8.8.4.4 index=2
Then you save the notepad file with the name: IP Manual.bat (remember the extension is .bat, not .txt)
Then you can double click the file, and please check the ip address of your computer.
Then your computer ip will change quickly like magic :)

Then the command to return it or set it to DHCP again is:

        netsh int ip set address "Local Area Connection" dhcp
        netsh int ip set dns "Local Area Connection" dhcp
        netsh int ip show config

Then please save with a different name with the suffix .bat

Notes:
Make sure when you double click the file, you are using an admin account, so you can change the IP. If on windows 10, to run it, please Right Click, Run as administrator
That's how to quickly change IP address with a bat file, hopefully it will be useful for technoappliances friends :)

0 Response to "How to quickly change the IP address with a .bat file"

Post a Comment

Iklan Tengah Artikel 1

Iklan Bawah Artikel