run a dos command

G

Guest

hey all,

how do i run a dos command from vb and make sure that the dos command
completes before proceeding back to vb?

thanks,
rodchar
 
C

Chris

rodchar said:
hey all,

how do i run a dos command from vb and make sure that the dos command
completes before proceeding back to vb?

thanks,
rodchar

Use the process class to start your program. The processinfo class will
gives you more control over it.

Chris
 
H

Herfried K. Wagner [MVP]

rodchar said:
how do i run a dos command from vb and make sure that the dos command
completes before proceeding back to vb?

I am curious which command you want to run. Maybe there is a better
solution. If you want to shell another application, you may want to use the
code below:

\\\
Dim p As Process = Process.Start("C:\foo.exe")
p.WaitForExit()
MsgBox("Program terminated!")
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top