![IP BAT Files Featured Image](https://i0.wp.com/theautomationblog.com/wp-content/uploads/2013/09/IP-BAT-Files-Featured-Image-1-1.jpg?resize=300%2C150&ssl=1)
Most of us in the industrial automation world connect to our company (or home) network using DHCP. But we also need to connect to our automation device networks via static IP address, resulting in many trips to the control panel to change our IP address settings.
But when you have multiple systems it becomes challenging to remember what IP address settings you need for each system.
To address this Darrell created several batch files that, when “double clicked,” change his Windows XP system’s IP address settings to match the system he needs to connect to. This not only saves him the time required to manually change these settings in the control panel, it also helps his colleagues (who connect less often) quickly chose the right IP address settings for the many systems they need to connect to.
Below I’ll paste in the contents of two of Darrell’s batch files which he was kind enough to share with our readers. The first is used for connecting in his office network via DHCP, and the second is used to connect to one of his automation systems (I’ve edited the text of the second file to remove the actual system’s IP address settings.)
Office Network (DHCP) Batch File contents:
Text File name:
Office LAN Network Settings.bat
Text File Contents:
@ECHO OFF
ECHO This file is brought to you by DARRELL CLARK!
ECHO Resetting IP Address and Subnet Mask For DHCP netsh int ip set address name = “Local Area Connection” source = dhcp
ECHO Here are the new settings for %computername%: netsh int ip show config
pause
Automation System Batch File contents:
Text File name:
Automation System 1 Network Settings.bat
Text File Contents:
@ECHO OFF
ECHO This file is brought to you by DARRELL CLARK!
ECHO Resetting IP Address and Subnet Mask For ********* automation system
netsh interface ip set address name=”Local Area Connection” source=static addr=192.168.100.2 mask=255.255.255.0
ECHO Here are the new settings for %computername%: netsh int ip show config
pause
To use the above text in a batch file on Windows XP, simply copy the text and paste it into Notepad. Then change the settings to match your requirements and save the file with a name which represents your system and ends with the .BAT file extension.
I hope Darrell’s batch files can be of some help for you. Admittedly, they are written for a Windows XP system so if you’ve created similar batch files for Windows 7 we’ve love to hear from you! You can leave your comments to this article by using the “post a comment or question” link below.
Until next time, Peace ✌️
If you enjoy this episode please give it a Like, and consider Sharing as this is the best way for us to find new guests to come on the show.
Shawn M Tierney
Technology Enthusiast & Content Creator
Eliminate commercials and gain access to my weekly full length hands-on, news, and Q&A sessions by becoming a member at The Automation Blog or on YouTube. You'll also find all of my affordable PLC, HMI, and SCADA courses at TheAutomationSchool.com.
- Automation Q & A for September 6, 2024 - September 6, 2024
- Emerson Robotic Paint Automation Solutions (P217) - September 4, 2024
- Automation News for September 4, 2024 - September 4, 2024
Discover more from The Automation Blog
Subscribe to get the latest posts to your email.
[…] Using Batch Files to change your PC’s IP address […]
Nice!
Thanks Will 🙂
Shawn Tierney
Join my free community to follow along! You can also become a member and support our work at: Automation.Locals.com
[…] NOTE: The newest version of this article is located at our sister site, The Automation Blog […]