Alternate tcp/ip config on an xp laptop

Posted on 2007-08-09
Last Modified: 2013-11-17

Hello, I have a laptop at work that is used at multiple offices, and I would like to let a user setup the
network configuration using the alternate configuration tab on the properties of tcp/ip.
Problem: we have some user that go back and forth between offices...and one office is setup
for static ip's ---all others are on dhcp service. How can a user traveling from one office to another (with
different network settings) and change their tcp/ip settings to the office they are located in?

Note--- all have xp pro loaded on the laptops, and the domain users have no permissions to change tcp/ip settings from their domain account.
I do see the tab for  alternate configuration in tcp/ip properties...and I have logged in as a domain administrator, and input all necessary settings. ...for the static setup, AND all settings are correct in the General tab (for dhcp usage).

So, we just need to know how to switch back and forth ---from a domain user's account--when a user travels to another office.

Question by:TeamMISCBC
    LVL 3

    Expert Comment

    You can script the process and place the shortcuts to the script on the users desktop. The user can be added to local "Network Configuration Operators" group so they can edit their TCP/IP settigs without being an ADmin on the box. The following sample script below can set both primary and an alternate IP address/mask; you can play with the script to see if it works for you:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set colNetAdapters = objWMIService.ExecQuery ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

    strIPAddress = Array("","")
    strSubnetMask = Array("","")
    strGateway = Array("")
    strGatewayMetric = Array(1)
    For Each objNetAdapter in colNetAdapters
        errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
        errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
        If errEnable = 0 Then
            WScript.Echo "The IP address has been changed."
            WScript.Echo "The IP address could not be changed."
        End If
    hope that helps
    LVL 14

    Expert Comment

    Netswitch will do this.  You can create shortcuts on the desktop, double click and all settings have changed.
    LVL 77

    Accepted Solution

    You can create VBS scripts, or batch files, but usually the easies way to allow the users to make the changes is with a 3rd party utility such as:

    My favorite is Netswitcher which will not only allow you to change the TCP/IP settings, but also drive mappings, printer selections, domain membership (not recommended), workgroup membership and more. A profile is created for each site and then simply with a click of a "button" all changes are made.

    However, as I recall users still need to be local admins (not domain admins) to make these changes. If so you can adjust user rights for network connections using group policies located in:
    User configuration | Administrative Templates |Network | Network Connections
    LVL 77

    Expert Comment

    by:Rob Williams
    Thanks TeamMISCBC.
    Cheers !

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    I originally posted this Article Here ( and thought I would now share with the Experts Exchange community. Driver Proble…
    I am not new to IT, I have been working in the field since 1985.  But recently I came up against something that stumped even me (it doesn't happen as often as I would like).  I was running a screencasting session from the laptop to my TV via ChromeC…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    754 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

    24 Experts available now in Live!

    Get 1:1 Help Now