Hey, I am looking to make a program that will be able to launch two other programs simultaneuosly. Can someone show me some code please Im pretty stuck :(
Ok, so I figured out how to use the Process class, but I am having trouble specifying where my programs are. Any tips
And for the .bat, I totally forgot that they are executable by themselves...but once again it didn't do anything when I launched it. I am sure I am putting the full adress to the programs but still no-go.
Hey, thanks for the quick responses. They are two exe files. I tried just sticking the Process.Start code into a button but I get this error:
Error 1 The name 'Process' does not exist in the current context C:\Documents and Settings\MATTHEW\Local Settings\Application Data\Temporary Projects\BF2VentLauncher\Form1.cs 25 13 BF2VentLauncher
I know I should know what the problem is but I dont.
And for the script file, what do I write to make my program launch that file
Are the programs executable files what is the extension of both files you'll have to make a script that will open both, depending on what type of file they are will determine how to open them.
If they are both executable files you'll make a notepad and write
cd\
c:\(path)(filename).exe
c:\(path)(filename).exe
exit
and save this as a (filename).bat file and run this when you need to.
Program to launch programs :)
zx5000
Ok, so I figured out how to use the Process class, but I am having trouble specifying where my programs are. Any tips
And for the .bat, I totally forgot that they are executable by themselves...but once again it didn't do anything when I launched it. I am sure I am putting the full adress to the programs but still no-go.
Michael_75
If the programs cannot be found by just specifying their name, include their path as well:
Process.Start(
"C:\SomeDir\SomeApp.exe")Chris Lively
Take a look at the Process class and it's Start() method... together you can launch a pair of apps just as easily as:
Process.Start("notepad.exe")Process.Start("calc.exe")
Dave27
Hey, thanks for the quick responses. They are two exe files. I tried just sticking the Process.Start code into a button but I get this error:
Error 1 The name 'Process' does not exist in the current context C:\Documents and Settings\MATTHEW\Local Settings\Application Data\Temporary Projects\BF2VentLauncher\Form1.cs 25 13 BF2VentLauncher
I know I should know what the problem is but I dont.
And for the script file, what do I write to make my program launch that file
Thanks, I appriciate it so much.
Marc6679
MechiF
Hi, StargatePwns
Should be
if (System.IO.File.Exists(@"C:\SomeDir\SomeApp.exe"))
It's better.
If you've further problems, pls feel free to let me know.
Thanks.
Musafir
Flam3h
project2n5e0o1
Are the programs executable files what is the extension of both files you'll have to make a script that will open both, depending on what type of file they are will determine how to open them.
If they are both executable files you'll make a notepad and write
cd\
c:\(path)(filename).exe
c:\(path)(filename).exe
exit
and save this as a (filename).bat file and run this when you need to.