0

Please forgive my noob-ness on this, but how do I package LAME.exe w/ a C# setup project? Currently, I have LAME being called like:

//use stringbuilder to create arguments    
var psinfo = new ProcessStartInfo( @"lame.exe")
    {
         Arguments = sb.ToString(),
         WorkingDirectory = Application.StartupPath,
         WindowStyle = ProcessWindowStyle.Hidden 
    };
var p = Process.Start( psinfo );
p.WaitForExit();

This works in debug and release modes on the development machine, but when I create a setup project for this, it never creates the MP3. LAME and the compiled code reside in the same directory when installed. Help!

CitizenX
  • 515
  • 1
  • 7
  • 18

1 Answers1

0

WindowStyle = ProcessWindowStyle.Hidden

Comment this out so you can actually read the error message that lame produces. Using a separate EXE is brittle this way, you cannot detect nor diagnose it failing to do its job. You might see something from Process.ExitCode, non-zero values are supposed to indicate failure.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Unfortunately, that didn't help. The LAME process didn't stay on the screen long enough to be useful. – CitizenX May 22 '10 at 14:55
  • Run it with cmd.exe /k lame.exe *options* so the console window stays open. – Hans Passant May 22 '10 at 14:56
  • Thanks, Hans. Turns out it was a directory issue. – CitizenX May 22 '10 at 16:19
  • I should have specified more detail: the problem was in the call to LAME. It contained a directory with a name like "this place". The problem wasn't with the deployment. Thanks, again, Hans for helping me troubleshoot this. – CitizenX May 26 '10 at 15:13