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

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Herfried K. Wagner [MVP] wrote:
"beaker" <randomcharacters@xxxxxxxxxxxxxxxxxxx> 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 .



Relevant Pages

  • Re: Anything similar to Cs "System()" function?
    ... within a standalone VB.NET application - something I would have done using ... Is there a way to suppress the DOS box that briefly flashes up? ... and 'CreateNoWindow' properties. ... M S Herfried K. Wagner ...
    (microsoft.public.dotnet.languages.vb)
  • Re: mailto
    ... extended by Herfried K. Wagner [MVP]: ... Imports System.Diagnostics ... Public Sub StartDefaultMail(_ ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • Re: Change to email functionality - reposted.
    ... extended by Herfried K. Wagner [MVP]: ... Imports System.Diagnostics ... Public Sub StartDefaultMail(_ ...
    (microsoft.public.dotnet.languages.vb)
  • Re: CopyMemory the .net way?
    ... Is FileGet function faster than opening a filestream and reading from that stream? ... "Herfried K. Wagner [MVP]" wrote: ... >> doesn't send any output to the immediate window, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Erase a specific line in a *.txt file
    ... Herfried K. Wagner [MVP] wrote: ... >>To erase data from a file, you have to build a new file with the desired ... If you can overwrite the original file with new data, fine, ...
    (microsoft.public.dotnet.languages.vb)