Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

conditionally executing 2nd command

$
0
0

hello

i want to write a windows batch file so that system first checks if preferred DNS server is set (exist) in NIC IPV4 settings, system continues executing the next command (which isnetdom join localhost /domain:......) 

but if it isn't set, system runs first command (netsh interface ipv4 set DNS server NIC 192.168.1.1 validate=no)

what would be that script?  ( i think via "IF" we can do that)

is this right forum to ask this question?

thanks


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>