Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting exe from another exe
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01322835
Message ID:
01322840
Views:
17
The second parameter required for System.Diagnostics.Process.Start() is a string, you are passing an array. Either pass the parameters concatonated to begin with, or use the string function to join the array.

Ex: System.Diagnostics.Process.Start(fullExename, parm1 & Space(1) & parm2);
Ex: System.Diagnostics.Process.Start(fullExename, String.Join(Space(1), arg));

The second way using the String.Join() method will allow you to pass however many parameters you need.

>Hi
>I am getting very confused,
>I want to start and exe with two parameters
>
>From the main app i have
>
>
>  string[] arg=  {parm1,parm2};
>  System.Diagnostics.Process.Start(fullExename,arg);
>
>
>but i get the error "cannot convert string[] to string"
>hows do I pass more then one parameter to an exe?
>
>once again TIA
>Stuart
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform