?
Solved

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

Posted on 2006-07-19
10
Medium Priority
?
656 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 600 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
The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

 

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 300 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 600 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
Make the most of your online learning experience.
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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

764 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