Solved

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

Posted on 2006-07-19
10
591 Views
Last Modified: 2013-11-29
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
Comment
Question by:TeamMISCBC
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 87

Expert Comment

by:rindi
Comment Utility
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
 
LVL 5

Assisted Solution

by:Dbergert
Dbergert earned 200 total points
Comment Utility
0
 
LVL 13

Expert Comment

by:prashsax
Comment Utility
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
 

Author Comment

by:TeamMISCBC
Comment Utility
Yes, the laptop IS running xp. Good question.
0
 
LVL 13

Expert Comment

by:prashsax
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 44

Assisted Solution

by:scrathcyboy
scrathcyboy earned 100 total points
Comment Utility
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
 

Author Comment

by:TeamMISCBC
Comment Utility
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
 

Author Comment

by:TeamMISCBC
Comment Utility
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
 
LVL 13

Accepted Solution

by:
prashsax earned 200 total points
Comment Utility
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
 
LVL 44

Expert Comment

by:scrathcyboy
Comment Utility
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

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Join & Write a Comment

This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

772 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

13 Experts available now in Live!

Get 1:1 Help Now