Need to pass in a Command Shell Javascript executable into a .NET C# GUI Form. Any ideas where to start?

I need to be able to pass in a Command Shell Javascript executable into a .NET, C# GUI Form. Any ideas where to start?
Here's why it needs to be done. When running this tool, called "parseSDLogs.exe", whereby you pass in a number of switches to it (see example below), you are only able to do this for one file at a time.
Here's the syntax usage:
C:\Java>parseSDLOGS.bat -d "\\crprdnsrc03\logs$\sd4\regional" -f "KB958644.log".
Instead of only being able to run this process on one logfile at a time, I need the ability for this executable to run on 2 or more files that will be selected from a list of files in a ListView Form.
Next, the output is outputed like this in the Command Shell after you run it:

C:\Java>parseSDLOGS.bat -d "\\crprdnsrc03\logs$\sd4\regional" -f "KB958644.log"
Starting Script - 11/04/08 14:07:10
Processing files
  KB958644.log
      Reading file - Total size 87971710 - To be read 15330935
   Total inserts: 17950
Ending Script - 11/04/08 14:24:25

So, I need to be able to capture this Output from the Command Prompt, displayed in a RichTextBox control for each file that is selected from the ListView Control. Finally, for each successful output displayed in the RichTextBox control for each file, I would also like this information written to a logfile for each Selected "log file" from the ListView that this will need to run on.

Can someone give me an idea of which Class/Methods/Properties to use. I'm just not sure which Class to use in order to pass the filename and switches to the parseSDLogs.exe file from the GUI and back to the GUI Control box.
Regards,
Wallace

Starting Script - 11/04/08 16:17:23
Usage: parseSDLogs [-f "filename"] [-d "directory"] [-D "Debug Level"] [-z] [-s] [-c] [-t]
 
	Monitors all the Software Distribution log files for status information
	in the \\Servername\logsshare\SD\regional directory
 
	-f	filename for a particular Distribution
		Default:
			All files
 
	-d	Directory to search for log files
		Default:
			\\ServerName\logshare\state\city
 
	-D	Sets the Debug level that is printed to the logfile
		Valid levels are
			DEBUG | INFO | WARN | ERROR | FATAL
 
	-z	Forces the script to re-read the log files
 
	-s	Print progress status to the console
 
	-c	Configures the script. Will be run automatically if config file is not found
 
	-t	Tests the database configuration

Open in new window

wally_davisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShazbotOKCommented:
I would just define a Process Start info then loop through each list item to call the process:

System.Diagnostics.ProcessStartInfo proc = new System.Diagnostics.ProcessStartInfo("c:\\JAVA\\parseSDLOGS.bat");
System.Diagnostics.Process procStart = new System.Diagnostics.Process();
 
forech(ListItem itm in MyListBox.Items)
{
    string logfile = itm.Text;
    proc.Arguments = String.Format("-d \"\\\\crprdnsrc03\\logs$\\sd4\\regional\" -f \"{0}\"",logfile);
    procStart.StartInfo = proc;
    procStart.WaitForExit = true;
    procStart.Start();
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ShazbotOKCommented:
I forgot to mention that in the System.Diagnostics.Process you can define where the output is to goto
0
wally_davisAuthor Commented:
ShazbotOK,
I'll need to test this tomorrow and will get back to you. Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.