Tag: sevenzipsharp

如何基本上用sevenzipsharp提取文件

我将使用sevenzipsharp从iso文件中提取文件到usb。 为此,我从vs nuget包管理器下载sevenzipsharp,我编码(实际上我不能:))这段代码。 我不接受任何错误,但它不工作。 我在哪里犯错误? 请写详细信息。 if (IntPtr.Size == 8) //x64 { SevenZip.SevenZipExtractor.SetLibraryPath(@”C:\Program Files\7-Zip\7z.dll”); } else //x86 { SevenZip.SevenZipCompressor.SetLibraryPath(@”C:\Program Files (x86)\7-Zip\7z.dll”); } using (var file = new SevenZipExtractor(sourcePath)) { file.ExtractArchive(outputPath); } 先感谢您

SevenZipSharp – 压缩内存流

我正在使用SevenZipSharp将文件压缩为zip文件。 有没有办法用它来从内存流创建一个zip(意思是,之前将文件加载到内存流中)? 谢谢,玛雅。

我如何使用Sevenzipsharp这段代码?

iv尝试了许多不同的方法让它工作,我得到它基本工作,但我不能得到WaitForExit(); 像他们在这里一样工作……所以我如何将其转换为使用sevenzip? 因为我无法让它工作,而且我的SFX是密码使得除了使用程序之外无法访问它们以及添加7z.DLL我无法添加它因为我收到错误: 无法添加对7za.dll的引用。 请确保该文件是可访问的,并且它是有效的程序集或COM组件。 string tempFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); System.Diagnostics.Process defrag1 = System.Diagnostics.Process.Start(@”AusLogics_Defrag.exe”, string.Format(” -o{0} -y -Pthisisthepass”, tempFolder)); defrag1.WaitForExit(); string executableDirectoryName = Path.GetDirectoryName(Application.ExecutablePath); System.Diagnostics.Process defrag2 = System.Diagnostics.Process.Start(tempFolder + “\\” + “AusLogics_Defrag” + “\\” + “DiskDefrag.exe”, “”); defrag2.WaitForExit(); System.IO.Directory.Delete(tempFolder + “\\” + “AusLogics_Defrag”, true); 新:好吧这是我到目前为止,但我得到的错误“无法加载7-zip库或内部COM错误!消息:无法加载库” SevenZipExtractor.SetLibraryPath(“7z.dll”); //no idea of this is needed or not SevenZipCompressor.SetLibraryPath(“7z.dll”); //no […]