0

The conversion is successfully worked but during conversion command prompt is open for a fraction of second..I dont want to show it

The code is:

string[] name = new string[all_audio_name.Count()];
string mpfile;
System.Diagnostics.Process pro = null;
mpfile = Path.GetFileName(all_audio_name[j]).Replace(".wav", ".mp3");
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo();
string outfile = "-b 32 --resample 22.05 -m j " + "\"" + new_path + "\\" + Path.GetFileName(all_audio_name[j]) + "\"" + " " + "\"" + new_path + "\\" + Path.GetFileNameWithoutExtension(all_audio_name[j]) + ".mp3" + "\"";
psi.FileName = HttpContext.Current.Server.MapPath("~/Dependencies/lame.exe");
psi.Arguments = outfile;
psi.UseShellExecute = false;
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
pro = System.Diagnostics.Process.Start(psi); //IGNORE VARIABLE NAME 

after System.Diagnostics.Process.Start(psi); line cmd prompt appear..plz suggest me to hide it..

tereško
  • 58,060
  • 25
  • 98
  • 150
Dhara
  • 1,914
  • 2
  • 18
  • 37
  • 1
    Answers from this thread should help: http://stackoverflow.com/questions/3440105/hide-command-window-in-c-sharp-application - Essentially just do `psi.WindowStyle = ProcessWindowStyle.Hidden;` – wkl Sep 01 '15 at 11:59
  • this was already written but ur link helped me thnx :) – Dhara Sep 01 '15 at 12:04

0 Answers0