c# - How to view Process.Start() Arguments as they are passed to executable -
i'm trying run fortran executable process.start , not working.
process proc = new process(); string args = "<c:\\file.in> c:\\file.out"; proc.startinfo = new processstartinfo(appname, args); proc.start(); if paste arguments command window application runs expected. proc.start() not run expected.
any ideas how can view start passing arguments? gut feeling quotes issue.
the executable launches , hangs, i'm confident appname getting passed in correctly, looks argument problem.
i tried setting workingdirectory of input , output files suggested in question: process.start() arguments did not work.
redirection < , > command line operators feature that's implemented command line processor. cmd.exe. use /c argument execute single command:
string args = "/c " + appname + " < c:\\file.in > c:\\file.out"; proc.startinfo = new processstartinfo("cmd.exe", args); proc.start();
Comments
Post a Comment