+ Post New Thread
Results 1 to 7 of 7
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 ...
  1. #1
    Paul_L's Avatar
    Join Date
    Jun 2005
    Location
    Lancaster, Lancs
    Posts
    199
    Thank Post
    26
    Thanked 15 Times in 10 Posts
    Rep Power
    21

    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?


    Paul

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,678
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    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

  3. Thanks to kmount from:

    Paul_L (2nd October 2008)

  4. #3

    SYSMAN_MK's Avatar
    Join Date
    Sep 2005
    Posts
    4,004
    Thank Post
    488
    Thanked 1,339 Times in 727 Posts
    Rep Power
    427
    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.

  5. 2 Thanks to SYSMAN_MK:

    Paul_L (2nd October 2008), Samson (14th October 2008)

  6. #4
    Paul_L's Avatar
    Join Date
    Jun 2005
    Location
    Lancaster, Lancs
    Posts
    199
    Thank Post
    26
    Thanked 15 Times in 10 Posts
    Rep Power
    21

    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)

    Paul

  7. #5

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,677
    Thank Post
    3,209
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

    hardware profile ?

    would a hardware profile solve this issue ? Just a thought and I do know that hardware profiles are a bit temperamental sometimes.

  8. #6
    Paul_L's Avatar
    Join Date
    Jun 2005
    Location
    Lancaster, Lancs
    Posts
    199
    Thank Post
    26
    Thanked 15 Times in 10 Posts
    Rep Power
    21
    Quote Originally Posted by mac_shinobi View Post
    would a hardware profile solve this issue ? Just a thought and I do know that hardware profiles are a bit temperamental sometimes.
    Thanks but this works a charm so I'm going to stick with it.

  9. #7


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,678
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    Very welcome

SHARE:
+ Post New Thread

Similar Threads

  1. Football Script
    By Hightower in forum General Chat
    Replies: 0
    Last Post: 11th July 2008, 02:33 PM
  2. Best script ever!
    By Zabu in forum Scripts
    Replies: 0
    Last Post: 6th November 2007, 11:48 PM
  3. Logon script & Printer script question.
    By Galway in forum Windows
    Replies: 3
    Last Post: 29th August 2007, 11:00 AM
  4. Does anyone have a script...
    By wesleyw in forum Scripts
    Replies: 4
    Last Post: 5th July 2007, 01:58 PM
  5. Yet another Logon Script
    By ajbritton in forum Windows
    Replies: 3
    Last Post: 19th June 2006, 09:47 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •