Welcome to my site. Please CLICK HERE to give your opinions regarding this new look of "PCTipsbyAnu". Thanks for visiting.

Friday, February 5, 2010

Browse » Home » , , , , , , » Change IP via batch (DOS)

Change IP via batch (DOS)

Is it possible to use IF/Els conditional script between DHCP and static changes?

When I run my script it will look for value DHCP=YES then it will run static IP change scripts and when it will find the Value DHCP=NO it will run the DHCP set script. 

as an example:
If DHCP = yes
then run Batch1

else skip


netsh int IP set address "local area connection" static 1
netsh int ip set dns "local area connection" static primary
netsh int ip set dns "local area connection" static secondary
If DHCP = no
then run Batch2

netsh int ip set address "local area connection" dhcp
netsh int ip set dns "local area connection" dhcp

something like that.

Is it possible. Would appreciate your help on this.
You can leave a response, or trackback from your own site.

About 'Anu': My name is 'Anu' also Known as 'ANU 007 TIGER' .I'm administrator of 'PC Tips by Anu' blog .This blog was opened for sharing contents about hacking n cracking.


Post a Comment

Back to Top