Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top