These scripts will find your external IP address and the current port used by utorrent process. I created this for myself, as I always randomize port numbers and my internet connection uses dynamic IPs so it is very tedious to find the port and IP everyday.

This will create the tracker address and copy it to your clipboard
Code:
setlocal enabledelayedexpansion

set "output=%temp%\url_tracker_%random%.txt"
bitsadmin.exe /transfer "Job1" http://ipv4.icanhazip.com/ "%output%"
set /p ExternalIP=<"%output%"
del "%output%"

for /f "tokens=2" %%a in ('tasklist^|find /i "userenity"') do (set pid=%%a)

set i=0
for /f "tokens=2 delims=:" %%a in ('netstat -a -n -o^|findstr /i %pid%') do (
  @for /f "delims= " %%b in ('echo %%a') do (
  set port=%%b
  set /a i=!i!+1
  if !i! EQU 1 (goto :out)
  )
)

:out
echo http://%ExternalIP%:%port%/announce|clip

And this will create the link for webUI by finding the port number and copy it to your clipboard
Code:
setlocal enabledelayedexpansion

for /f "tokens=2" %%a in ('tasklist^|find /i "userenity"') do (set pid=%%a)

set i=0
for /f "tokens=2 delims=:" %%a in ('netstat -a -n -o^|findstr /i %pid%') do (
  @for /f "delims= " %%b in ('echo %%a') do (
  set port=%%b
  set /a i=!i!+1
  if !i! EQU 1 (goto :out)
  )
)

:out
echo http://localhost:%port%/gui/|clip