Trying to run another utility from within my app, and it makes like a stick of dynamite

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
<span style="font-family:Times New Roman; font-size:small Im getting this run-time err msg:
<span style="font-family:Times New Roman; font-size:small Win32 Exception was Unhandled<br/>
The System cannot find the file specified

<span style="font-family:Times New Roman; font-size:small ...with this code:
<span style="font-family:Times New Roman; font-size:small if (!(SortSimJrIsRunning()))<br/>
{<br/>
SortSimJr = Process.Start("SorterSimulatorJr.exe"); //<-- heres where it blows up<br/>
}
<span style="font-family:Times New Roman; font-size:small ...
<span style="font-family:Times New Roman; font-size:small private bool SortSimJrIsRunning()<br/>
{<br/>
try<br/>
{<br/>
System.Diagnostics.Process[] p = System.Diagnostics.Process.GetProcessesByName("SorterSimulatorJr");<br/>
return (p.Length != 0);<br/>
}<br/>
catch (Exception ex)<br/>
{<br/>
MessageBox.Show(ex.ToString());<br/>
return false;<br/>
}<br/>
}
<span style="font-family:Times New Roman; font-size:small (I tried it with and without the ".exe" tacked on)
<span style="font-family:Times New Roman; font-size:small I want my utility to start another utility in certain scenarios. The invoked utility does exist, at:
<span style="font-family:Times New Roman; font-size:small C:SorterSimulatorJrSorterSimulatorJrbinDebugSorterSimulatorJr.exe
<span style="font-family:Times New Roman; font-size:small What am I missing here? <hr class="sig Photographer/Writer/Drummer: www.iceagetrail.posterous.com

View the full article
 
Back
Top