[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 668
  • Last Modified:

Need to setup a batch file on a user's computer to change tcp/ip settings

Hello experts. . .

I have a user in our company that travels to a satellite office, and uses her laptop pc there.
One caveat---the satellite office has no dhcp server setup for the users there. The home office - of course--does!

Her laptop is setup for the home office (dhcp is use here), and when she plugs in the pc into our satellite office---well-- you guessed...no network access. Permissions don't allow a user to change settings for tcp/ip. . .

SO -- is there a way for me to setup a batch file for her to run...when at the satellite office...and use her pc on the network there?

And, can I/we put in the administrator account password (in the batch file)...so that settings CAN be changed to match the network there...by the user?
Thanks in advance.

TeamMIS
0
TeamMISCBC
Asked:
TeamMISCBC
  • 3
  • 3
  • 2
  • +2
3 Solutions
 
rindiCommented:
If the PC is using XP as OS, you can setup an alternative configuration for the tcp/ip settings. If no dhcp server is found, it will use the ip set in the alternative configuration tab...
0
 
prashsaxCommented:
To configure Static IP address

-----------------------------------------------------------------------------------------------
netsh interface ip set address name="Local Area Connection"
netsh interface ip set address local static 10.1.1.2 255.255.255.0 10.1.1.1 1
-----------------------------------------------------------------------------------------------

To configure back to DHCP

----------------------------------------------------------------------------------------------
netsh interface ip set address "Local Area Connection" dhcp
----------------------------------------------------------------------------------------------
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
TeamMISCBCAuthor Commented:
Yes, the laptop IS running xp. Good question.
0
 
prashsaxCommented:
Missed on the DNS and WINS.
Here is the new batch script.

For static Address
----------------------------------------------------------------------------------------
netsh interface ip set address name="Local Area Connection"
netsh interface ip set address local static 10.1.1.2 255.255.255.0 10.1.1.1 1
netsh interface ip set dns "Local Area Connection" static 10.0.0.1 primary
netsh interface ip set wins "Local Area Connection" static 10.0.0.1
-----------------------------------------------------------------------------------------

For DHCP
---------------------------------------------------------------------------------------
netsh interface ip set address "Local Area Connection" dhcp
netsh interface ip set dns name="Local Area Connection" source=dhcp
netsh interface ip set wins name="Local Area Connection" source=dhcp
----------------------------------------------------------------------------------------

Just remember to rename the Network Card Name. Here it is "Local Area Connection".
0
 
scrathcyboyCommented:
The correct way to do this, via microsoft rules, is to set up 2 profiles for her.  All you do is clone her main profile to another name on the same system, and then setup that profile for a fixed IP address, with the right gateway, and 2 DNS records matching the ISP at that location.  Then she never has to change anything, just login with the different profile at the other location.  It is easy to set up and easy for her.
0
 
TeamMISCBCAuthor Commented:
scrathcyboy,

 Good idea...I have to ask some stuff about this...
 
Q- Where do I clone her profile --- at the client or the server?  

Q- How do I clone a user's profile? I haven't done that before...

Q- Once the two profiles are setup, how does she choose between one or the other? ---ie...is it similar to logging in as admin (as opposed to logging into our lan)...and choosing the local pc (it has a drop down arrow...and I choose --for logging in as admin, the pc's id)? I know how and can easily show her how to choose the correct login--if it's like that...

Thanks for the input.
0
 
TeamMISCBCAuthor Commented:
Prashax,

           I see in your batch file you have "Local area connection" in a few of the lines. What network card "name " do I put instead of "local area connection"?
I notice that windows 2000 calls it "local area connection" ...I think windows xp calls it the same thing...

Q-- in the batch script, are you saying that I need to have the connection in windows match the name in the script? IE...IF it is called "dog" in windows, then in the script it has to be called "dog", too ?
0
 
prashsaxCommented:
Yes, you are correct.

You need to change the name of the "Local Area Connection" to whatever you have for NIC.

By default it is indeed "Local Area Connection".

Just change the Name of NIC and run the script.

One more alternative would be to use commercial MultiNetwork Profile Manager.
Here are few links:
http://programurl.com/network-profile-manager.htm
http://www.jitbit.com/netprofileswitch.aspx

0
 
scrathcyboyCommented:
You want to clone her profile on the computer itself.  So do start, log off "herusername" and then log back in as Administrator -- probably no password.  Then the screen will look totally different and her apps appear to be gone.  No worry they are in her profile.

As Administrator, use windows explorer to go to documents and settings --
Look for her user name -- say it is JAN -- for sake of a name.
Now make a directory under documents and settings as JAN1.  Now select ALL files/directories in JAN and copy the whole lot to JAN1.  (make sure no files are hidden in explorer --set folder options to show everything).

Now go to user manager, and Make a new user JAN1.  Give it the same password as JAN.  Now log out.  She can now login as either JAN1 or JAN ans setup each profile differently.  If she gets a lot of her profile stuff from the server, that shouldnt matter -- all you are trying to do here is customize the NIC and TCP/IP setup of JAN1 for her other location.  She need make no more changes than just those settings, other than that, the profiles can be identical.  It is easy once you get the hang of it.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now