Solved

How can I have my c# code run a perl script and know when the script has been completed

Posted on 2008-06-25
1
341 Views
Last Modified: 2008-06-27
I have a perl script that compiles a bunch of data...I want to be able to fire off that script as a part of a larger routine..So I need to figure out how to A run the perl script inside the c# app but compiling the data takes about 15 minutes..so I need a way to have the app be able to identify when the script has completed and then continue running the rest of its routine.


The c# app is running as a web service

0
Comment
Question by:Prysson
1 Comment
 
LVL 16

Accepted Solution

by:
CuteBug earned 500 total points
ID: 21866112


ProcessStartInfo ps = new ProcessStartInfo("perl.exe", "program.pl args");

ps.UseShellExecute = false;

ps.RedirectStandardOutput = true;

Process p=new Process();

p.Start(ps);

string output = p.StandardOutput.ReadToEnd();

p.WaitForExit();

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now