How to put two arguments into the Argument property, And after run process this arguments should be read by the bat file.
I mean that :
if I write
var proc = new Process
{
StartInfo =
{
FileName = "batosql.bat",
**Arguments = serverNameTextBox+ " " + pathToSql,**
WindowStyle = ProcessWindowStyle.Hidden,
ErrorDialog = true,
WorkingDirectory = Path.GetDirectoryName(".")
}
};
after start process
proc.Start();
these arguments should be put into the bat file
osql -E -S %1 -i %2
You may need to wrap the arguments in quotation marks, if they contain spaces or other special characters.