Scripting of DNS changes

This is a discussion about Scripting of DNS changes in the Windows Networking category; 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.

Windows Networking 2246 This topic was started by ,


data/avatar/default/avatar36.webp

3 Posts
Location -
Joined 2001-06-13
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

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Jun 14
Created
Jun 14
Last Response
0
Likes
1 minute
Read Time
User
Users

Responses to this topic


data/avatar/default/avatar36.webp

3 Posts
Location -
Joined 2001-06-13
OP
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