I want to execute multiple commands as below:
cd C:\\Informatica\\9.0\\clients\\PowerCenterClient\\client\\bin
pmrep
connect -r rs_01_lab -d Domain_D
In MS-DOS you can execute multiple commands in one line by separating the commands with an ampersand (&).
String strCmdTxt = "/c cd C:\\Informatica\\9.0\\clients\\PowerCenterClient\\client\\bin & pmrep & connect -r rs_01_lab -d Domain_DELLBANPDB01 -n etl_designer -x etl123";
ProcessStartInfo i = new ProcessStartInfo("cmd.exe", strCmdTxt);
Process p = new Process();
p.StartInfo = i;
p.Start();
You need to set the parameter in the ProcessStartInfo.
Example.
Either set the Arguments Property
Or use a different overload of the .Start() method.