SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Knowledge is key 2 progression Tryst's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Create batch file for setting new DNS server settings

    Hi all,

    Because I have to VPN into my work network every day, I have the laborious task of having to manually change the DNS settings on my wireless adapter each time I have logged in through the VPN so that the DNS settings are working correctly, then when I log out of the VPN I have to reset the DNS settings on my wireless adapter (change setting back to...'Obtain DNS server address automatically') so that I can use the wireless card when I am not VPN'd into my work network.

    What I was thinking was to wrap up these changes into a Batch file so that I can just click this for it to run the changes.

    Is this at all possible, and if so, can you shed some light on how to do this?

    Thanks in advance.

  2. #2
    SitePoint Wizard silver trophy rushiku's Avatar
    Join Date
    Dec 2003
    Location
    A van down by the river
    Posts
    2,056
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    This may help, I think it's VBScript using WMI...I'm reasonably sure a DOS batch file isn't going to make this happen.

  3. #3
    Knowledge is key 2 progression Tryst's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, this looks quite interesting.

    So is WMI the only way to achieve this?


Bookmarks

Posting Permissions

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