我正在使用 lame 为我的一个项目进行转码。问题是当我从 C# 调用 lame 时,会弹出一个 DOS 窗口。有什么办法可以抑制这种情况吗?
到目前为止,这是我的代码:
Process converter =
Process.Start(lameExePath, "-V2 \"" + waveFile + "\" \"" + mp3File + "\"");
converter.WaitForExit();
最佳答案
你有没有尝试过类似的东西:
using( var process = new Process() )
{
process.StartInfo.FileName = "...";
process.StartInfo.WorkingDirectory = "...";
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.Start();
}
关于c# - 使用命令行参数在 C# 中运行 exe,抑制 dos 窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2546049/