With the following command i can get the current IP:
nslookup myip.opendns.com resolver1.opendns.com
It will output this:
Where the last line of the output is the current IP. So that would be 126.96.36.199
I want that address to be stored into a variable so I can use it in a batch script.
I want to use that variable with this command:
route add <IP> mask 255.255.255.255 192.168.x.x metric 1
Where <IP> would be the variable with 188.8.131.52.
How can i accomplish this with a simple batch script?
Thank you for your help.