Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WshShell.Exec or WshShell.Run

Status
Not open for further replies.

draylan

IS-IT--Management
Jul 29, 2004
54
SG
Hi, I've run into a bit of a problem and hope someone can help. I'm trying to write a script that will run a tracert and then output the captured data. I've tried both WshShell.Exec and .Run method but each seem to have something I need but not both. I would like it to continue the script while the tracert is running but at the same time use stdin/stdout to capture the output without saving to a temp file. Is this possible?

I know i'm supposed to use the bWaitOnReturn command for the one part but that exists only in wshshell.run. And that doesn't support capturing the output without saving a temp file. Is there a way for WshShell.Exec to send a "fake" return true value? The reason I need this is because the program will timeout in 60 secs if the script doesn't complete and tracert can take longer than that. Any help would be appreciated.

Thanks,

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top