Submitted By: Iten de Wodach

Uses the tool Portqry.exe to monitor local ports.

Visual Basic
Edit|Remove
dd = Day(Date())& "-"
md = Month(Date())& "-"
yd =Year(Date())
MyDate = dd & md & yd 

ht = Hour(Time()) & "h"
mt = Minute(Time()) & "m"
st = Second(Time()) & "s"
MyTime = ht & mt & st

DTM = "_" & MyDate & "_" & MyTime

Set objShell = CreateObject("WScript.Shell")
objShell.Run("%COMSPEC% /c PORTQRY /LOCAL /L PORTQRYLOG_" & DTM & ".TXT")