ja-lol
ja-lol

Reputation: 43

I need a wait command in VB

hello am writing a code in VB to send commands to cygwin terminal and i want the code to wait for the first command to wait untill the first command is excuted (or wait about 2 min) and then continue to the next command, the a part of the code:

Shell("C:\cygwin\bin\mintty.exe")
SendKeys.Send("tracert -h  " & _h & " " & domain.Text & " > temp1.txt{ENTER}")

the program should wait 2 min here and then continue to the next command, thanks.

Upvotes: 2

Views: 12249

Answers (2)

aphoria
aphoria

Reputation: 20189

Try this:

System.Threading.Thread.Sleep(120000)

The value is in millseconds.

Upvotes: 3

Nathan Rice
Nathan Rice

Reputation: 3111

You need to add:

Wscript.Sleep 120000

Upvotes: 0

Related Questions