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 18.104.22.168
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 22.214.171.124.
How can i accomplish this with a simple batch script?
Thank you for your help.