【发布时间】:2015-06-16 09:05:32
【问题描述】:
我想用 C# 运行这个命令:
"%WIX%/bin/heat.exe" 目录 "C:\Documents and Settings\APP" -gg -sfrag -cg Appli -out wixappli.wxs
我有这个代码(Program.cs):
System.Diagnostics.Process process1 = new System.Diagnostics.Process();
process1.StartInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe");
process1.StartInfo.Arguments = String.Format("/k \"%WIX%/bin/heat.exe\" dir \"{0}\" -gg -sfrag -cg Appli -out wixappli.wxs ",
@"C:\Documents and Settings\APP");
process1.StartInfo.WorkingDirectory = @"C:\Documents and Settings\test";
process1.StartInfo.CreateNoWindow = true;
process1.StartInfo.ErrorDialog = false;
process1.Start();
错误:
'C:\Program' 未被识别为内部命令或外部命令 命令
我不明白,因为没有 C#,它可以工作。
你能帮帮我吗?
【问题讨论】:
标签: c# command-line wix heat