How to Quickly Change the IP Address With a .Bat file

Don't forget to read the previous article, namely> Beginner Programming Guide.

Continue to use the Batch File, if in the previous article you already know a lot about the commands in batch files. now you will be taught how to quickly change the ip address by entering the script and we create a batch file. Use it later to make it easier for you, just double-click the file.

How to Change the IP Address of a computer Manually?
For those of you who use multiple IP addresses on your computer for testing and other purposes. to change the ip address takes a few 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 the Default Gateway
10. Enter the DNS Server Address
11. If you have all click Save

With the 11 steps above, you can just change the IP ADDRESS on your computer.
If you want to be more practical and fast, you can also use batch files so that to change the IP address on your computer, you just have to double-click the file that we will create below.

How to Change Computer IP ADDRESS with a 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 .bat extension is 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 a .bat suffix

Note:
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 the Quick Way to Change IP Address with Bat Files, hopefully this will be useful for JNM friends :)

Apart from being a programming information medium, we also share articles related to Android trick tips.

Subscribe to receive free email updates:

0 Response to "How to Quickly Change the IP Address With a .Bat file"

Post a Comment