Automatically configuring static IP addresses on a network card?  Is there a batch file available I could use anywhere?

Posted on 2003-03-11
Medium Priority
Last Modified: 2010-04-13
I have a user who I want to be able to change their IP settings automatically, I was wondering if there was a batch file available where I could change the IP values to automatically update someones networking settings for me once I specified what I want them to be.

Question by:mmanning
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 12

Expert Comment

ID: 8111738

Expert Comment

ID: 8112065
That’s a reg file for an NT machine not a 2000 machine. I would be careful using this approach as you know what can happen if you screw with the registry like that.

I don't know if you can assign static IP via a batch file. I know you could create a batch file to use IPCONFIG /release then do a /renew; however this is obviously for a DHCP client. However again if you create an IP reservation in the DHCP scope you can mandate this IP to the machine even though it's a DHCP client.

Hope this helps,


Accepted Solution

NstyDevil earned 1000 total points
ID: 8112327
try this one....

there is a little known utility called Netsh, and it is exactly what you want (from what i see anyway)  here is a little sample for you.

put the following lines into a batch file and you'll be all set. just change the ip address ( to the IP you want, and then the gateway, and finally the dns server you have.

netsh interface ip set address "Local Area Connection" static 1

netsh interface ip set dns "Local Area Connection" static

Expert Comment

ID: 8133970
Have you looked into a scripted solution?  Try :


The scripting center has numerous solutions to help make the life of an administrator a little less frustrating.

Author Comment

ID: 8332585
Thanks, sorry for taking so long to get back

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question