I have a problem: I have a script that needs to check if a tcp port is used. if its not used it shall start a program, if the port is used it should do nothing.
The tcp port I want to check is 5555.
I read something about winsock but didnt really get anywhere :s.
I could do it by using the netstat ?command and put the output in a file but thats taking to long as it needs to be done under 300ms (milisecounds).
Question
eccofresh
Hi,
I have a problem: I have a script that needs to check if a tcp port is used. if its not used it shall start a program, if the port is used it should do nothing.
The tcp port I want to check is 5555.
I read something about winsock but didnt really get anywhere :s.
I could do it by using the netstat ?command and put the output in a file but thats taking to long as it needs to be done under 300ms (milisecounds).
thx in advance!
Link to comment
https://www.neowin.net/forum/topic/337251-vbscript-check-if-tcp-port-is-open/Share on other sites
4 answers to this question
Recommended Posts