By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,699 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,699 IT Pros & Developers. It's quick & easy.

run a dos command

P: n/a
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
Feb 7 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
Feb 7 '06 #2

P: n/a
"rodchar" <ro*****@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/>

Feb 7 '06 #3

P: n/a
thanks everyone this helped.

"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

Feb 8 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.