how to set second dns use netsh

R

Richard.S.Zhu

Hi,everyone!
I create a batch file setip.bat to set ip in command line in win2000.
"setip.bat"
netsh exec setip.sh

While setip.sh like
"setip.sh"
int ip
set address name ="local area connection" source = static addr= 10.1.1.20
mask = 255.255.255.0
set address name ="local area connection" gateway = 10.1.1.1 gwmetric = 1
set dns name="local area connection" static 10.1.1.3

The batch file works as it shows,but how to set the secondary dns in batch
file?
And how to create the batch file if I want to use the command "setip
10.1.1.30" to execute the batch while transfer the ip address 10.1.1.30 in
setip.sh?

Any help will be appreciated!
Thanks

Richard Zhu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top