Application Working Path

Hello all,
I want to launch an application, which is quite easy: Process.Start("myfolder\\myapp.exe");
but, I can't find the way to set the working directory of the application I launch (since it should be myfolder).
Any ideas?
Thanks!
[287 byte] By [Tischnoetentoet] at [2007-11-19 18:39:29]
# 1 Re: Application Working Path
System.Reflection.Assembly.GetExecutingAssembly.Location will return the full path and the name of the executing assembly.

Edit
And the easiet one is System.AppDomain.CurrentDomain.BaseDirectory()
Shuja Ali at 2007-11-9 11:19:04 >
# 2 Re: Application Working Path
But, how can I set the working directory of the application that I launch?
Tischnoetentoet at 2007-11-9 11:20:04 >
# 3 Re: Application Working Path
But, how can I set the working directory of the application that I launch?
Oh, I misread your first post. You need to StartInfo to set the Working Directory like this Process pTemp = new Process();
pTemp.StartInfo.WorkingDirectory = @"C:\Temp";
pTemp.StartInfo.FileName = "notepad.exe";
pTemp.Start();
Shuja Ali at 2007-11-9 11:21:02 >
# 4 Re: Application Working Path
Thank you!
Tischnoetentoet at 2007-11-9 11:22:07 >
# 5 Re: Application Working Path
Thank you!
You are welcome :)
Shuja Ali at 2007-11-9 11:23:05 >