Solved

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

Posted on 2006-07-19
10
615 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 88

Expert Comment

by:rindi
ID: 17141045
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
ID: 17141104
0
 
LVL 13

Expert Comment

by:prashsax
ID: 17141199
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

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

Expert Comment

by:prashsax
ID: 17141220
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
 
LVL 44

Assisted Solution

by:scrathcyboy
scrathcyboy earned 100 total points
ID: 17142430
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
ID: 17145604
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
ID: 17146201
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
ID: 17146828
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
ID: 17148319
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

778 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