Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
666 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
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Suggested Courses
Course of the Month11 days, 21 hours left to enroll

636 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