Scripts Thread, Need a Script if Possible in Coding and Web Development; One of the Heads I work for is now head at two schools and has one laptop that he wishes ...
2nd October 2008, 10:52 AM #1
Need a Script if Possible
One of the Heads I work for is now head at two schools and has one laptop that he wishes to use at both schools.
Both have different static IP addresses.
What I would like to be able to do for him is write two scripts so he can run one or the other from his desktop and change the IP address and setttings for whichever school he is at.
Hope someone can come up with a suggestion, or is there a freebie program that would do this?
IDG Tech News
2nd October 2008, 10:55 AM #2
The static IP is probably going to be the least of your problems if he wants to use any domain related stuff on the new site as the laptop won't want to be on two domains at once!
That being said, yes you can script this through the use of "netsh".
Instructions in the link
Thanks to kmount from:
Paul_L (2nd October 2008)
2nd October 2008, 11:02 AM #3
You could use netsh to dump the network settings to text files. And then use it again to import the correct one when needed.
netsh -c interface dump > NetworkSetsNo1.txt
This command will store your current network settings in txt file named NetworkSetsNo1.txt. Create a different one for each site.
Then use the following command to import the setting you want:
netsh -f NetworkSetsNo1.txt
Should be able to create 2 batch files which can be run by the user.
2 Thanks to SYSMAN_MK:
Paul_L (2nd October 2008), Samson (14th October 2008)
2nd October 2008, 02:13 PM #4
Just a follow up
Thanks to Kmount & Sysman MK, they put me on the right track and I have got this working with 2 bat files (not vbs as perhaps suggested).
In the end I just copied and pasted from the following site
Configure TCP/IP from the Command Prompt
Which worked a treat and I even have a bat file that will clear the 'static address' and take me back to DHCP (including DNS)
2nd October 2008, 02:16 PM #5
hardware profile ?
would a hardware profile solve this issue ? Just a thought and I do know that hardware profiles are a bit temperamental sometimes.
2nd October 2008, 02:31 PM #6
Thanks but this works a charm so I'm going to stick with it.
Originally Posted by mac_shinobi
2nd October 2008, 03:33 PM #7
By Hightower in forum General Chat
Last Post: 11th July 2008, 03:33 PM
Last Post: 7th November 2007, 12:48 AM
By Galway in forum Windows
Last Post: 29th August 2007, 12:00 PM
By wesleyw in forum Scripts
Last Post: 5th July 2007, 02:58 PM
By ajbritton in forum Windows
Last Post: 19th June 2006, 10:47 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)