Home All Groups Group Topic Archive Search About
Author
7 Feb 2006 7:50 PM
rodchar
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

Author
7 Feb 2006 8:15 PM
Chris
rodchar wrote:
> 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
Author
7 Feb 2006 9:09 PM
Herfried K. Wagner [MVP]
"rodchar" <rodc***@discussions.microsoft.com> schrieb:
> 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!")
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
8 Feb 2006 5:51 AM
rodchar
thanks everyone this helped.

Show quoteHide quote
"rodchar" wrote:

> 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