Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 730455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:54:49+00:00 2026-05-14T06:54:49+00:00

This code executes handbrakecli (a command line application) and places the output into a

  • 0

This code executes “handbrakecli” (a command line application) and places the output into a string:

Dim p As Process = New Process    
p.StartInfo.FileName = "handbrakecli"
p.StartInfo.Arguments = "-i [source] -o [destination]"
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardOutput = True
p.Start

Dim output As String = p.StandardOutput.ReadToEnd
p.WaitForExit 

The problem is that this can take up to 20 minutes to complete during which nothing will be reported back to the user. Once it’s completed, they’ll see all the output from the application which includes progress details. Not very useful.

Therefore I’m trying to find a sample that shows the best way to:

  1. Start an external application (hidden)
  2. Monitor its output periodically as it displays information about it’s progress (so I can extract this and present a nice percentage bar to the user)
  3. Determine when the external application has finished (so I can’t continue with my own applications execution)
  4. Kill the external application if necessary and detect when this has happened (so that if the user hits “cancel”, I get take the appropriate steps)

Does anyone have any recommended code snippets?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:54:50+00:00Added an answer on May 14, 2026 at 6:54 am

    The StandardOutput property is of type StreamReader, which has methods other than ReadToEnd.
    It would be more code, but if you used the Read method, you could do other things like provide the user with the opportunity to cancel or report some type of progress.

    Link to Read Method with code sample:

    http://msdn.microsoft.com/en-us/library/ath1fht8(v=VS.90).aspx

    Edit:

    The Process class also has a BeginOutputReadLine method which is an asynchronous method call with callback.

    http://msdn.microsoft.com/en-us/library/system.diagnostics.process.beginoutputreadline(v=VS.90).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 542k
  • Answers 542k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use: SELECT p.id as a, p.url as b, t.id as… May 17, 2026 at 3:22 am
  • Editorial Team
    Editorial Team added an answer There are two parts to the problem First Issue You… May 17, 2026 at 3:19 am
  • Editorial Team
    Editorial Team added an answer I thought I'd show the regex approach, too. It doesn't… May 17, 2026 at 3:18 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Considering this code, can I be absolutely sure that the finally block always executes,
I am getting this error on a remote server, but the same code executes
this code always returns 0 in PHP 5.2.5 for microseconds: <?php $dt = new
Perplexed here.... This code: $qry = sprintf(INSERT INTO news_sites_homepage_grab VALUES ('', %d, '%s', NOW(),
I have the following code. This code executes the same sql query twice. Because
This code is executed by many way. When it's executed by the form button
This code in JS gives me a popup saying i think null is a
This code is from Prototype.js . I've looked at probably 20 different tutorials, and
This code works (C# 3) double d; if(d == (double)(int)d) ...; Is there a
This code always works, even in different browsers: function fooCheck() { alert(internalFoo()); // We

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.