Can anyone help me on this:
I am trying to make batch which will:
- get_my_ip
- reset_router
- check if changed?
IF YES END, ELSE GO TO END
:GET_MY_IP
for /f "skip=4 usebackq tokens=2" %%a in ('nslookup myip.opendns.com resolver1.opendns.com') do echo %%a
:RESET_ROUTER_AND_WAIT_TIMER
:CHECK_IP
IF NEW_IP == PREVIOUS_IP GOTO RESET_ROUTER AND INCREMENT TIMER TIME
:IP_IS_NOT_THE_SAME
END
For BATCH I am using command promt - command
for /f "skip=4 usebackq tokens=2" %%a in ('nslookup myip.opendns.com resolver1.opendns.com') do echo %%a
to get external IP address
get_my_iptoIP_IS_NOT_THE _SAME)