string CandlePath = "C:\\Program Files (x86)\\WiX Toolset v3.11\\bin\\candle.exe";
string BundlePath = "C:\\Solution Directory\\Bundle.wxs";
string wixObjPathToSave = "C:\\Solution Directory\\Bundle.wxs";
ProcessStartInfo processStartInfo = new ProcessStartInfo("cmd.exe");
processStartInfo.WindowStyle = ProcessWindowStyle.Normal;
processStartInfo.Arguments ="/k \"" + candlePath + "\" " +BundlePath + " " +wixObjPathToSave;
[当我像上面那样传递参数时,进程正在接受参数,但是Candle.exe给出错误,因为我没有给bundlePath和wixobjPathToSave提供双引号,所以无法将'C:\ Solution'识别为内部或外部命令] >
processStartInfo.Arguments ="/k \"" + candlePath + "\" \"" +BundlePath + "\" \"" + wixObjPathToSave +"\"";
当我传递上面的参数时,该过程给出错误,即'C:\ Program'无法识别为内部或外部命令。
我做错了什么?
string CandlePath =“ C:\\ Program Files(x86)\\ WiX Toolset v3.11 \\ bin \\ candle.exe”;字符串BundlePath =“ C:\\ Solution Directory \\ Bundle.wxs”;字符串wixObjPathToSave =“ C:\\ Solution Directory \\ Bundle ....
我知道了答案