
Code: Select all
@echo off
:: WhatIsMyIP.cmd - returns public IP address
:: requires: wget.exe
wget -q -O %temp%\MyIP http://icanhazip.com
for /f "delims= " %%G in (%temp%\myip) do set PublicIP=%%G & del %temp%\MyIP
echo. & echo Your public IP address is: %PublicIP% & echo.
>Nul Timeout 5