【发布时间】:2014-12-14 01:26:48
【问题描述】:
这是我的代码:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "cmd.exe";
String mypath = Assembly.GetExecutingAssembly().Location.ToString();
mypath = mypath.Substring(0, mypath.LastIndexOf("\\"));
startInfo.Arguments = "/k "+
string.Format("\"{0}\"" + " " + ProcessIds[clientlist.SelectedIndex] + " " + "\"{1}\"",
mypath + "\\MIMT.exe",
mypath + "\\No.Ankama.dll");
process.StartInfo = startInfo;
process.Start();
现在结果:
看起来空间有问题,尽管引用了,但我不明白。
【问题讨论】:
-
取争论行,把它变成一个字符串,在字符串上设置一个断点并读取它的值。将 startInfo.Arguements 指向该字符串。断点应该告诉你所有你需要知道的。
-
我已经这样做了,它不适合我,因为一切都是正确的,如果我在 cmd 上复制参数值,那就行了。但它不适用于 process.Start() img4.hostingpics.net/pics/302390Sanstitre.png 如果我直接在控制台中复制它,它的工作...