Brad 0 Posted June 13, 2001 Hello all! I am relatively new around here so hopefully I will get the posting protocol right. I am in a work/school situation which requires 3 separate ip setups. The first is DHCP with the dns obtained at login. The second is static with primary and secondary dns servers. Finally, the third also is static with a different set of dns servers. I have been able to write a batch which changes the ip from DHCP to either of the statics depending on a passed commandline parameter, however I cannot find a way to change the dns. If it is available under netsh I cannot find it, nor can I find adequate documentation about how to script it. I am going to try doing it by direct registry manipulation tonight, but this is undesirable for obvious reasons. Certainly if there is a manner of changing the ip, there is a manner of changing the dns, right??? Thanks, -Brad ps. System is an Athlon 1.2gHz on Win2k with 320mb of ram Share this post Link to post
Brad 0 Posted June 14, 2001 Hello again! I actually was able to figure it out after some good old fashioned tinkering. Id be happy to send the code to anyone who is interested. --Brian Share this post Link to post