• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 473
  • Last Modified:

Is there any way to make DOS Shell Script to wait on VB program to complete?

Thanks in advance,
-Al
0
AlexF777
Asked:
AlexF777
3 Solutions
 
EDDYKTCommented:
Try this


Option Explicit

Dim WshShell
Dim ReturnCode

'Syntax: Return Code = WshShell.Run (strCommand, [intWindowStyle], [blnWaitOnReturn])

'This example will execute example.exe and wait until it is done
Set WshShell = CreateObject("Wscript.shell")
ReturnCode = WshShell.Run("calc.EXE", , True)
msgbox "hello"
Set WshShell = Nothing
0
 
frodomanCommented:
You can also call a .bat file that contains:

START /W MyVBProgram.Exe
@ECHO This won't execute until MyVBProgram has completed.

0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now