TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jay Webster
NA
67
0
[SOLVED] CmdLine Process
Apr 11 2011 7:40 PM
Hi,
I am trying to run a console app through console when running my winform app.
I want to run the following:
abgx360 -ctxa --rgn 00FE0000 -- "F:\game.iso" > "C:\output.txt"
It should run through and produce output to output.txt. If I run it through on the command line directly, it works.
When I run it on my app it runs through but does not output to the file, I think the problem is with the > (Char)62.
Does > on a command line mean the same as (char)62? Should I be using something different?
I have been to the developer of the app and he is stumped, and since it works on the command line, I can only assume that it must be something wrong with my code.
I have the following code:
private void RunAbgx()
{
const string abgxPath = @"C:\Windows\SysWOW64\abgx360";
var outputPath = @"C:\output.txt";
var argument = " -ctxa --rgn 00FE0000 -- " + (Char)34 + txtPath.Text + (Char)34 + " " + (Char)62 + " " + (Char)34 + outputPath + (Char)34;
// argument is: -ctxa --rgn 00FE0000 -- "F:\game.iso" > "C:\output.txt"
var pProcess = new Process
{
StartInfo =
{
FileName = abgxPath,
UseShellExecute = false,
Arguments = argument,
RedirectStandardOutput = false
}
};
pProcess.Start();
pProcess.WaitForExit();
}
Reply
Answers (
13
)
Reading from an writing to a text file by omitting specific lines in the read file.
How do I use Console Ap Graphic Drawings in Windows Form?