i need to run this dos command in a VB application and record the outcome in a Chart the line needs to run until its told to stop, can anyone help please.
"netstat - e > c:\temp.txt"
Thanks
Printable View
i need to run this dos command in a VB application and record the outcome in a Chart the line needs to run until its told to stop, can anyone help please.
"netstat - e > c:\temp.txt"
Thanks
Does it really need to run until you tell it to stop? Or, can you invoke it from code until you get the response you want?
I don't know what netstat -e does, but I do know that you are recreating temp.txt each time it runs. Presumably, you are getting a response that says no action and sooner or later, you get an action response.
If this is the case you could check the filelength of test.txt after each iteration of "netstat -e > text.txt" for any changes.
Hope this helps.
Good Luck
DerFarm
i can run the command in dos but i dont no how to get a VB application to run DOS then the command
Just my $0.02 :
Using this:
will overwrite Text.txt, whereasCode:Dir C:\ >Text.txt
will append to the file ;)Code:Dir C:\ >>text.txt
Enjoy!
maybe you can try it a console program..
there is a tutorial on this sight:
http://www.vb-world.net/articles/console/index.html