Calling a Windows .exe from C#
<p>I am trying to call <code>tlbExp.exe</code> from C# using <code>Process.Start</code>. I pass the command string as argument, but no matter what flavor of it, I always end up with an error message:</p>

<pre><code>The system cannot find the file specified

   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start(String fileName)
</code></pre>

<p>If I try to run the command string separately in a command window while debugging, it does what it supposed to happen (tlb generated from a dll). However, I can't get it to work from the code.</p>

<pre><code>string tlb;
...
tlb += @"C:\Program files\Microsoft SDKs\Windows\v6.0A\bin\tlbExp.exe";
tlb += @""""; tlb += @" """; tlb += outputDllPath;
tlb += @""" /out:"""; tlb += outputTlbPath; tlb += @"""";
Process.Start(tlb); 
</code></pre>
