extract password

Sep 20, 2009 at 10:51 PM
Edited Sep 20, 2009 at 10:52 PM

How do you set a password when extracting?   When I try to set the password, the error message says  "SevenZip.SevenZipBase.Password' is inaccessible due to its protection level ".   This is my code:

SevenZip.SevenZipExtractor.SetLibraryPath(@"C:\Program Files\7-Zip\7z.dll");
SevenZip.SevenZipExtractor zipex = new SevenZip.SevenZipExtractor(@"d:\test.part1.rar");
zipex.Password = "pass";
zipex.Check();

Sep 26, 2009 at 12:36 AM

Try

SevenZip.SevenZipExtractor zipex = new SevenZip.SevenZipExtractor(@"d:\test.part1.rar", "pass");