Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Pass DOS netstat information to vbs script

Jun 21, 2007 9:55AM PDT

I would like to have my vbs script sleep until enough sockets have changed back from from "TIME_WAIT" (when using the dos netstat command). I am able to find out how many connections are waiting in dos by using the [netstat | find /c "TIME_WAIT"] command, but I would like to pass the number that command returns to a variable in my vbs script. Is this possible?

Discussion is locked

- Collapse -
Re: netstat and vbscript.
Jun 23, 2007 5:15AM PDT

Redirect the output of the find to a file (using &gtWink. Then read the file in vbscript to see the contents.

Kees

- Collapse -
Thank Kees
Jun 27, 2007 1:44AM PDT

I was hoping there was going to be a way to do this without the file redirection, but oh well. I appreciate your response.