To be clear: I have never actively heard of hta before this post and it’s basically a big pile of shit, but this little thing worked out of the box, but lacked the port information. I googled around Microsoft’s WMI implementation and finally found the way to get the port name (which was simple) and the corresponding IP address (which was not). I’ve modified Don’s script to include this.
To say this even clearer than for my other scripts: This comes with absolute no warranty. I have no clue about WMI programming or hta, so this could probably break things. In my case, it worked quite well. Copy this script into a .hta-file and doubleclick.