[Mono-winforms-list] Run One Exe from another exe
Thu, 27 Jan 2005 01:10:31 -0800
On Thu, 2005-01-27 at 19:39 +0530, Umashankar Ashwathnarayanan wrote:
> I am running one simple Program that call another exe
> Code :
> System.Diagnostics.Process proc = new System.Diagnostics.Process();
> proc.Start(); proc.WaitForExit();
> This is call when i press the button.
> The WindowTest.exe is present in bin folder of the application,
> When i Press the button ,
> it call that Speficied file/path is not present
Try printing out System.IO.Directory.GetCurrentDirectory (). Thats the
directory that is being looked in for the exe. What you probably need to
do is build your path based on the executing assemblies path. Use:
System.Reflection.Assembly.GetExecutingAssembly ().CodeBase to get the
executing assemblies path. Then from there you can create the proper
path to pass to the StartInfo.
> Can any body help me.
> Mono-winforms-list maillist - Monoemail@example.com