@echo off setlocal :: Get local IP address (IPv4 only) for /f "tokens=2 delims=:" %%A in ('ipconfig ^| findstr "IPv4"') do ( set IP=%%A ) :: Remove leading spaces for /f "tokens=* delims= " %%B in ("%IP%") do set IP=%%B :: Create temporary VBS file echo Set objShell = CreateObject("WScript.Shell") > temp.vbs echo objShell.Popup "Your IP address is: %IP%", 0, "IP Address Info", 64 >> temp.vbs :: Run the VBS popup cscript //nologo temp.vbs :: Delete the temporary VBS file del temp.vbs exit