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 3312894
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:03:02+00:00 2026-05-17T22:03:02+00:00

I have an application with a Process that use a cmd program. The Process’s

  • 0

I have an application with a Process that use a cmd program. The Process’s output is redirect like so:

pr.StartInfo.RedirectStandardOutput = true;
pr.StartInfo.UseShellExecute = false;
pr.StartInfo.CreateNoWindow = true;                                         
pr.EnableRaisingEvents = true
pr.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
pr.OutputDataReceived += new DataReceivedEventHandler(OnDataReceived);      
pr.ErrorDataReceived += new DataReceivedEventHandler(OnDataReceived); 

The output is then written to the console using:

public void OnDataReceived(object sender, DataReceivedEventArgs e)
{
    if(e.Data != null)                                  
    {
        Console.WriteLine(e.Data);
    }
}

My problem is the Visual Studio prints the output, it’s very different to the commandline output. For example, I’m trying to extract data from the output to see how much work has been done. My application output:

0K ………. ………. ………. ………. ………. 1% (null)
50K ………. ………. ………. ………. ………. 2% (null)
100K ………. ………. ………. ………. ………. 3% (null)
150K ………. ………. ………. ………. ………. 5% (null)

The original Commandline program output (progress bar and percentage accumulates as time goes on):
100%[===================================]

It may not seem a big difference, but for what I’m trying to achieve it is. Why isn’t Visual Studio output exactly the same as the CMD out?

Ps. Arguments are the same in both examples.

  • 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-17T22:03:03+00:00Added an answer on May 17, 2026 at 10:03 pm

    A console and a file is very different. The progress bar clearly uses some special console specific features that are not present when redirecting (which is effectively a file).

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

Sidebar

Related Questions

I have an application that takes the quality results for a manufacturing process and
I have a C linux application (A) that spawns another process (P) when it
We have an Excel 2002/XP based application that interacts with SQL 2000/5 to process
I have a quite big XML output from an application. I need to process
We have a layered application, or at least is in the process of transitioning
We have in the process of upgrading our application to full Unicode comptibility as
I have to present some 'process' or 'flow' of the application at work on
I have an ASP.NET application. Basically the delivery process is this one : Nant
I have an application that sends messages to an external web service. I build
I've been trying to use Java's ProcessBuilder to launch an application in Linux that

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.