PC Review


Reply
Thread Tools Rate Thread

7zip, console process and read StandardOutput

 
 
jack
Guest
Posts: n/a
 
      26th Aug 2006
I start process 7zip (http://www.7-zip.org/):

myProc.StartInfo.FileName = Application.StartupPath + @"\7z.exe";
myProc.StartInfo.Arguments = "a -mx9 -y -r " + pathwhat + " " pathwhere
myProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProc.StartInfo.CreateNoWindow = true;
myProc.StartInfo.UseShellExecute = false;
myProc.StartInfo.RedirectStandardOutput = true;
myProc.Start();

and in timer:
stream = myProc.StandardOutput.ReadLine()
in stream I have everything without current ammount of percent which is show
in console window.
7zip in console looks that:
[..]
Compressing h:\x:\1.a
Compressing h:\x:\2.a
Compressing h:\x:\3.a 33% -> this ist last line at this moment

I need to have a current amount of percent "xx%" in stream which shows in
process console window in the last line (always three last characters).

Can anybody help me ?

jack.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
process standardoutput Lin Microsoft C# .NET 0 29th Nov 2006 02:46 PM
ASP 1.1 - StandardOutput from console application Harald Fichtner Microsoft ASP .NET 1 6th Oct 2006 09:17 PM
Process.StandardOutput Steve Microsoft C# .NET 4 20th Oct 2005 03:55 PM
Could not get the standardoutput from the process simultaneously when the process is executing. BasicQ Microsoft VB .NET 0 14th Apr 2005 03:00 PM
Process.StandardOutput.Read Blocks Asynchronous Behavior? Al Cohen Microsoft C# .NET 3 6th Sep 2003 11:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:25 PM.