problem starting a new process

  • Thread starter Thread starter giannik
  • Start date Start date
G

giannik

I have 2 vb.net apps (MyApp1.exe and MyApp2.exe)

When I try to start a new instance of MyApp2.exe from within MyApp1.exe

I use the followung code:

Dim p As ProcessStartInfo = New ProcessStartInfo()

p.FileName = "MyApp2.exe"

p.Arguments = strFirstArgument + " " + strSecondArgument

Process.Start(p)

but I get the exception:

'System cannot find the file specified'

If I add the full path to MyApp2.exe it works fine, but is there a way to
just provide the apps name

and start the new process?

Thank you

giannik
 
Hi

Place your Exe in the Bin directory and by using application setting call
the exe its does'nt require the system path.

Regards
Prabakar
 
Back
Top