G
Guest
I have a simple .bat file (TESTMAIN.bat):
"C:\fo.bat" -xml "C:\07.xml" -xsl "C:\fo.xsl" "c:\output.pdf"
I call this using C#:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName =@"c:\TESTMAIN.bat";
But I want to remove the hardcoded parameters ("C:\07.xml" and "C:\fo.xsl")
from TESTMAIN.bat file.
So i modify the .bat file as (is it correct??):
"C:\fo.bat" -xml %1 -xsl %2 "c:\output.pdf"
Now how do i call/replace these parameters in C#
p.StartInfo.Arguments= ??
Any pointers on how to do this?
"C:\fo.bat" -xml "C:\07.xml" -xsl "C:\fo.xsl" "c:\output.pdf"
I call this using C#:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.FileName =@"c:\TESTMAIN.bat";
But I want to remove the hardcoded parameters ("C:\07.xml" and "C:\fo.xsl")
from TESTMAIN.bat file.
So i modify the .bat file as (is it correct??):
"C:\fo.bat" -xml %1 -xsl %2 "c:\output.pdf"
Now how do i call/replace these parameters in C#
p.StartInfo.Arguments= ??
Any pointers on how to do this?