Per-user IP configuration on Windows XP

Posted on 2008-09-30
Last Modified: 2013-11-05
I use a laptop computer to program various network hardware devices.  Each device has it's own default IP address scheme and progamming software.  Each time I need to work with a certain device, I have to reconfigure my TCP/IP settings.

What I would like to set up, is to be able to create seperate Windows logins for each type of device, with the laptop's IP address being automatically set to the correct configuration for that type of device, and with the programming software shortcuts on the desktop.

For a hypothetical example, I should just be able to login as the user "Siemens", and then my IP address is set to or login as "Rockwell" and have my IP address as

I know network settings are supposed to be per machine, but I was wondering there was a better way than continuously manually changing settings.  I'd hoped to find something in the local user policies, but no luck.  Perhaps it will have to be a login script?

Thanks in advance

Question by:nicolasn
  • 3
LVL 14

Expert Comment

ID: 22605256
What you need is a network profile switcher (just google that). There are quite a lot of shareware programs. Here is free for non-commercial use:

Accepted Solution

Seth_zin earned 125 total points
ID: 22605572
You could setup a bat file on each of the accounts (or all on one account if you prefer and just make folders for the different shortcuts, save you some time) to do it for you. Then all you do is double click a bat file when you log into that account.

You said you are advanced on this subject so I won't waste your time, here is a quick set of what you need to type into the bat file .
--To Set IP/Subnet mask/gateway/metric enter the following command:
netsh interface ip set address "Local Area Connection" static IPADDRESS SUBNET GATEWAY 1

--To set dns/secondarydns enter the following commands:
netsh interface ip set dns "Local Area Connection" source=static DNSADDRESS
netsh interface ip add dns name="Local Area Connection" SECONDARYDNS index=2

For anyone who reads this and wants a little more info and a link to a site with other netsh commands read below:
Use the netsh command and make it look something like this:
To change the IP/Subnet/default gateway use
netsh interface ip set address "Local Area Connection" static IPADDRESS SUBNET GATEWAY 1
(Notice the 1 at the end after gateway. it is the "metric". According to some sites you don't need to add that, but if I didn't, it wouldn't work so I changed it to 1 and it worked fine).

Next you you change your DNS (if needed) to do that add something like:
netsh interface ip set dns "Local Area Connection" source=static DNSADDRESS
netsh interface ip add dns name="Local Area Connection" SECONDARYDNS index=2

Notice again one says source=static, if I didn't include that it didn't work but when adding the secondary (using the add command) it didnt work with it lol. Don't know why but the above way is how I tested it on XP Pro SP3 (I imagine it works on 2000 and vista too but I'm not positive).

If you want more information check out Scroll down to the comment section and you will see a post for "The commands in the article need to be corrected as follows" then he list them all. I tested those and they all seem to work. It also has dhcp setup etc. Hope that helps, I see a lot of people that come to work on the machine at our shop here use a bat file like above.

Author Comment

ID: 22621598
Hi Seth_zin,

I like the sound of your suggestions.  This could possibly even be combined with a login script if desired.

Give me a day or two to test it out.


Author Comment

ID: 22667383
Sorry to keep you waiting.  I'm still trying to get a chance to experiment properly with the suggested solutions.


Author Closing Comment

ID: 31501527
Tested and working.  This technique can be used from a batch file with a shortcut on the desktop, or run when I log in.

Thanks for your effort,

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Question has a verified solution.

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

Suggested Solutions

Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

948 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now