我有这个 BAT 文件“iARP.BAT”
Content Begin
@ECHO OFF
npg -vv -f %1 -d %2
Content End
我正在尝试将文件名(在循环中)作为第一个参数传递,将设备名称(先前声明的变量)作为第二个参数传递。我正在尝试这样做:
for (int i = 1; i < arpFiles.Count; i++) {
p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.WorkingDirectory = Application.StartupPath;
p.StartInfo.FileName = Application.StartupPath + "\\iARP.bat";
String argument1 = Application.StartupPath + "\\" + arpFiles[0].Name;
p.StartInfo.Arguments = argument1 + deviceName;
p.StartInfo.Verb = "runas";
p.StartInfo.CreateNoWindow = true;
p.Start();
}
BTW arpFiles = List 但它没有执行任何人都可以帮助我吗?