tags:

views:

226

answers:

1

I am writing a c# application that uses 7-zip to compress a directory. 7-Zip returns an exit status after zipping up a file. In the console window all I see is

Everything is Ok

which equates to an exit code of 0. But does anybody know if there is a way I can get that number?

+3  A: 

I assume you're starting 7-zip as a separate process using the System.Diagnostics.Process class.

From MSDN:

Process.ExitCode Property

Gets the value that the associated process specified when it terminated.


You might be interested in SevenZipSharp which provides a managed wrapper for the 7z.dll.

dtb