命令行 Start.Info.Argument 错误
command line Start.Info.Argument error
我想要 运行 这个命令用 C# :
"%WIX%/bin/heat.exe" dir "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' is not recognized as an internal command or external
command
我不明白,因为没有 C#,它可以工作。
你能帮帮我吗?
通常,路径环境(%windir%、%temp%、等)使用反斜杠 (\)。尝试修改您的参数以使用反斜杠而不是斜杠 (\"%WIX% \ bin \ heat.exe\"...
我想要 运行 这个命令用 C# :
"%WIX%/bin/heat.exe" dir "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' is not recognized as an internal command or external command
我不明白,因为没有 C#,它可以工作。
你能帮帮我吗?
通常,路径环境(%windir%、%temp%、等)使用反斜杠 (\)。尝试修改您的参数以使用反斜杠而不是斜杠 (\"%WIX% \ bin \ heat.exe\"...