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

Anything similar to C's "System()" function?

P: n/a

Hello,

I'm trying to call a program (and/or batch file) from a command line
from within a standalone VB.NET application - something I would have
done using the "System()" function if I was working in C.

The only way I've found so far is

System.Diagnostics.Process.Start("blah.exe in out")

(I'll be creating 'in' and processing 'out' from within my app).

Is this the best way to do it? Is there a way to suppress the DOS box
that briefly flashes up?

Thanks in advance for any advice,

Gary
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"beaker" <ra**************@rhubarbblahblah.net> schrieb:
I'm trying to call a program (and/or batch file) from a command line from
within a standalone VB.NET application - something I would have done using
the "System()" function if I was working in C.

The only way I've found so far is

System.Diagnostics.Process.Start("blah.exe in out")
Yes.
(I'll be creating 'in' and processing 'out' from within my app).

Is this the best way to do it? Is there a way to suppress the DOS box
that briefly flashes up?


You may want to check out the 'ProcessStartInfo' class and its 'WindowStyle'
and 'CreateNoWindow' properties. Maybe this solves your problem.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
Herfried K. Wagner [MVP] wrote:
"beaker" <ra**************@rhubarbblahblah.net> schrieb:
I'm trying to call a program (and/or batch file) from a command line
from within a standalone VB.NET application - something I would have
done using the "System()" function if I was working in C.

The only way I've found so far is

System.Diagnostics.Process.Start("blah.exe in out")

Yes.
(I'll be creating 'in' and processing 'out' from within my app).

Is this the best way to do it? Is there a way to suppress the DOS box
that briefly flashes up?

You may want to check out the 'ProcessStartInfo' class and its
'WindowStyle' and 'CreateNoWindow' properties. Maybe this solves your
problem.


It did indeed solve my problem!

Thanks for the help.
Gary
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.