Running PhantomJs from command prompt using C# -
i trying run phantomjs.exe
throw c# code. code :
process process = new process(); processstartinfo startinfo = new processstartinfo(); startinfo.windowstyle = processwindowstyle.normal; startinfo.filename = "cmd.exe"; startinfo.workingdirectory = @"e:\"; startinfo.arguments = "some string code here"; startinfo.createnowindow = true; process.startinfo = startinfo; process.start();
when run going workingdirectory e:/
arguments not writing on cmd prompt.
can buddy suggest me run arguments on cmd.exe?
in order cmd.exe accept further command argument, need precede command /k (if want cmd window stay open) or /c (if want window close after command has completed). so:
argument ="/c phantomjs highcharts-convert.js -infile options1.json -outfile chart1.png -scale 2.5 -width 300 -constr chart -callback callback.js";
should need.
however, if want run phantomjs program, agree tommi: run without starting cmd.exe process first (i.e. use startinfo.filename = "phantomjs.exe";
instead.
Comments
Post a Comment