我正在尝试调用提供的命令行批处理工具程序。反复试验把我带到了ProcessStartInfo
……问题是参数必须是常数。我一直在收集要在参数中使用的路径和文件名。如何在参数中使用变量?
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = "sbsmutator.exe";
startInfo.WorkingDirectory = @"C:\Program Files\Allegorithmic\Substance\\BatchTools\1.x\";
startInfo.Arguments = " specialization --input " + templatePath + " --presets-path " + resourcesPath +
" --output-name " + name +
" --output-graph-name " + RemoveSpaces(name) +
" --output-path " + sbsPath;