How can I run a .exe program from my own program

P

P Andrews

Hi,

I am new to programming, am currently learning visual basic .NET.

Does anybody know how I can run a small .exe from within my own program, for
example I want to write a simple app, where the user has some text boxes and
whatever they type in here, when they press a go button an app runs with the
users input added as a paramenter, so if I was running program.exe and the
user input "full" into the text box the command run would become program.exe
/full

So basically my app just runs another little program with some parameters
after it.

Any help would be welcome,

Thanks,

Peter
 
H

Herfried K. Wagner [MVP]

* "P Andrews said:
I am new to programming, am currently learning visual basic .NET.

Does anybody know how I can run a small .exe from within my own program, for
example I want to write a simple app, where the user has some text boxes and
whatever they type in here, when they press a go button an app runs with the
users input added as a paramenter, so if I was running program.exe and the
user input "full" into the text box the command run would become program.exe
/full

\\\
Imports System.Diagnostics
..
..
..
Dim p As New ProcessStartInfo()
p.FileName = "Foo.exe"
p.Arguments = "/foo"
Process.Start(p)
///
 

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