7zip

How to properly set path in Powershell and 7zip?

让人想犯罪 __ 提交于 2019-12-11 14:02:56
问题 I have a Powershell script to create a self-extracting archive via 7zip. But it's receiving this error: cannot find specified SFX module The Powershell code is: set-alias sz "$env:ProgramFiles\7-Zip\7z.exe sz a -t7z -sfx -ppassword $fullpath $filetostore Both variables are valid. I've tried -sfx and -sfx7z.sfx , same error. The 7z.sfx file is indeed in the correct folder with 7zip. I can also verify the alias is working, as the 7zip copyright appears when running the code (so 7zip commandline

ProcessBuilder in Java

坚强是说给别人听的谎言 提交于 2019-12-11 10:55:33
问题 I´m studing about this subject in this page, but I can´t find the solution, how can I execute programs in cmd using ProcessBuilder? I want to compress, open, delete a file with 7zip using the command line. I have this code as example, but doesn´t work, cmd starts but doesn´t create the compress file: String[] commands= {"cmd.exe", "7za", "a", "-t7z", "test.7z", "Test.txt", "/C", "start"}; ProcessBuilder pb = new ProcessBuilder(commands); 回答1: The problem is a little bit in Java (start()

A reference to .dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component

≯℡__Kan透↙ 提交于 2019-12-11 09:37:08
问题 Ok now i will try to explain my problem as much as possible. I want to use popular compression algorithm 7zip at my c# project There is already NuGet package for 7zip Now when i install 7zip page https://www.nuget.org/packages/SevenZipSharp/0.64.0 it installs fine however it gives error when i try to run An unhandled exception of type 'SevenZip.SevenZipLibraryException' occurred in SevenZipSharp.dll Additional information: Can not load 7-zip library or internal COM error! Message: failed to

How to hide error messages in 7Zip command line?

为君一笑 提交于 2019-12-11 08:48:24
问题 -inul command prevents error-box from coming up in WinRar command line. Is there any equivalent command for 7Gz.exe? 回答1: 7-Zip writes all its messages to stdout , including error and warning messages. This means you can collect all the output from it by redirecting stdout it to a file. A command like the following will redirect all output (including from stderr) to Log.txt: 7za a Test.7z *.* >Log.txt 2>&1 来源: https://stackoverflow.com/questions/21118929/how-to-hide-error-messages-in-7zip

Decompressing 7z archive using py7zlib gives *** ValueError: data error during decompression

佐手、 提交于 2019-12-11 02:39:44
问题 My code is as follows (from here: Example of how to use PyLZMA) import py7zlib ... #filename.__class__ is <class 'django.core.files.uploadedfile.InMemoryUploadedFile'> archive = py7zlib.Archive7z(filename) data = archive.getmember(archive.getnames()[0]).read() The error that I get is: *** ValueError: data error during decompression The archive I am testing with is a driver compressed in 7z downloaded from the manufacturer's website. I have also used 7zip to create a 7z archive to test with,

Create split archives (zip, rar, 7z)?

雨燕双飞 提交于 2019-12-10 21:41:17
问题 In short: I need to split a single (or more) file(s) into multiple max-sized archives using dummy-safe format (e.g. zip or rar anything that work will do!). I would love to know when a certain part is done (callback?) so I could start shipping it away. I would rather not do it using rar or zip command line utilities unless impossible otherwise. I'm trying to make it os independent for the future but right now I can live if the compression could be made only on linux (my main pc) I still need

how to execute 7zip commands from python script

不问归期 提交于 2019-12-10 19:37:12
问题 I am trying to get a basic idea of how the os.system module can be used to execute 7zip commands. For now I don't want to complicate things with Popen or subprocess. I have installed 7zip and copied the 7zip.exe into my users folder. I just want to extract my test file install.zip. However using the code below causes the shell to appear briefly before exiting and no unzip has occurred. Please could you tell me why? def main(): try: os.system(r"C:\Users\Oulton\ 7z e C:\Users\Oulton\install.zip

Decompress a 7zip archive with multiple files & directories in Java [closed]

旧城冷巷雨未停 提交于 2019-12-10 15:58:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I want to decompress a 7zip/lzma archive with multiple files & directories in Java. I tried to use the official 7zip SDK, but I failed, as my programming skills are not that advanced for this subject. However I fonud some libraries which make the support in Java easier, speaking of LzmaOutputStream

Unzipping and zipping a working .xpi makes it stop working

北城以北 提交于 2019-12-10 11:36:44
问题 I downloaded the basic Hello World xpi from Mozilla, and it installed in my Firefox without any problems. Then I unistalled the addon, unzipped the xpi, then, without changing anything inside it, zipped it again using 7zip. I tried to install it, and Firefox gave me a "This addon could not be installed because it appears to be corrupt" error. 回答1: Unzipping the .xpi produces a folder with the same name as the .xpi, with its contents. To create a working .xpi, zip the contents of that folder,

using 7zip sdk to compress a file, but the archive file is not as original and can not decompress using unrar

做~自己de王妃 提交于 2019-12-10 11:23:50
问题 I am using 7zip sdk (http://www.7-zip.org/sdk.html) to compress a file. it works fine using this wrapper: public void EncodeSingleFile(FileStream inStream, FileStream outStream) { bool eos = false; Int32 dictionary = 1 << 21; Int32 posStateBits = 2; Int32 litContextBits = 3; // for normal files // UInt32 litContextBits = 0; // for 32-bit data Int32 litPosBits = 0; // UInt32 litPosBits = 2; // for 32-bit data Int32 algorithm = 2; Int32 numFastBytes = 128; string mf = "bt4"; propIDs = new