|
-
Jul 18th, 2006, 02:55 AM
#2
Re: [02/03] Getting output from shell
Don't use Shell in .NET applications. Use Process.Start. You pass the path of the file to be executed to the first argument and any commandline parameters to the second argument. Process.Start is more flexible than Shell and has more functionality. You should read the help topics for the Process.Start method and the ProcessStartInfo class.
Also, I would suggest using the String.Format method rather than multiple concatenations. It is eminently more readable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|