Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Guys,

I have struck with issue regarding process arguments, please help.
Part of my code below:

ProcessStartInfo info = new ProcessStartInfo();
info.FileName = MsiTran;
info.Arguments = "-a """ + MSTpath + "\" " + MSIpath"";

MSIpath and MSTpath are already defined string variables.

I get error: only assignment call increment decrement .....can be used as statement

How can setup my arguments to cal the pre-defined variables.
Please help me with the syntax.
Posted

1 solution

Um...
Try:
C#
string info.Arguments = "-a \"" + MSTpath + "\" \"" + MSIpath + "\"";

If MSTpath is "D:\MST", and MSIpath is "C:\MSI" that should generate an argument string of:
-a "D:\MST" "C:\MSI"
 
Share this answer
 
Comments
Mohan Subramani 8-Sep-14 16:31pm    
thank you sir.
OriginalGriff 8-Sep-14 16:43pm    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900