By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,672 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,672 IT Pros & Developers. It's quick & easy.

Process

P: n/a
Appearantly you can't use a redirection command in the
Arguments property. You have to:
1. set RedirectStandardOutput to true
2. set UseShellExecute to false
3. start process
4. assign myProcess.StandardOutput to a streamreader
and do with it what you will, I read it in to a string
and then wrote that to an output file.
-----Original Message-----
Can anyone tell me why this code won't produce an output
file? From a Dos prompt it works. Thanks.

Process myProcess = new Process();
myProcess.StartInfo.FileName="C:\\mysql\\bin\\mys qldump.e xe";
myProcess.StartInfo.Arguments="--opt test >
C:\\mysql\\bin\\test.out";
myProcess.StartInfo.WorkingDirectory="C:\\mysql\\ bin\\";
myProcess.Start();
.

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.