7zip

Why does 7zip Ignore my InstallPath when making a SFX installer?

眉间皱痕 提交于 2019-11-30 04:18:59
问题 Currently, I am making a SFX with 7zip using the following config: ;!@Install@!UTF-8! InstallPath="C:\\test" GUIMode="2" RunProgram="7z465.exe" ;!@InstallEnd@! I then package 7z465.exe into Setup.7z, and then call the following line in a batch file: copy /b "C:\Program Files\7-Zip\7zSD.sfx" + config.txt + ".\Release\Setup.7z" .\Release\Setup.exe When I run the resulting Setup.exe, It extracts fine and launches the 7z465.exe as well, but it is still extracting to some 7zip temp folder for the

How can I get 7za.exe to run via Powershell Remoting?

我们两清 提交于 2019-11-30 03:52:23
I've tried a number of different ways to do this, they all result in the same error. Here is one set of commands: $s = New-PSsession -ComputerName ServerA $job = Invoke-Command -Session $s -Scriptblock { Start-Process -FilePath "C:\Scripts\ArchiveEventLogs\ver4.5\7za.exe" -ArgumentList "a", "C:\Scripts\Eventlogs.bak\ServerA-20101111.7z", "C:\Scripts\Eventlogs.bak\*.evt*", "-mx7", "-oC:\Scripts\Eventlogs.bak", "-wC:\Scripts\Eventlogs.bak", "-t7z" -Wait } -AsJob Get-Job | Wait-Job Receive-Job Job$ The output I get is this: 7-Zip (A) 9.17 beta Copyright (c) 1999-2010 Igor Pavlov 2010-10-04

Unzip files (7-zip) via cmd command

倖福魔咒の 提交于 2019-11-29 20:20:22
I try to unzip a file via CMD. So I install winzip (and its plugin to cmd), winrar and 7-zip. But when I try to execute a command via the CMD: 7z e myzip.zip It gives the next error: 7z is not recognized as an internal or external command In addition, I added the folder of 7-z to the environment variables (Properties--> advanced --> Environment Variables --> user variable --> choose path, and add C:\Program Files\7-Zip What can be the reason? Doing the following in a command prompt works for me, also adding to my User environment variables worked fine as well: set PATH=%PATH%;C:\Program Files

How to extract zip file contents into a folder in .NET 4.5

烈酒焚心 提交于 2019-11-29 18:06:32
The following question's answer seems to outline how to extract files using the System.IO.Commpression.ZipFile.ExtractToDirectory method invocation. "ZipFile" doesn't seem to exist in .NET 4.5, when adding a reference to System.IO.Compression. How can I extract files from a *.zip file in .NET 4.5? How to Unzip all .Zip file from Folder using C# 4.0 and without using any OpenSource Dll? This seems to show how to compress files. But I'm looking for the reverse. Zipping files in .NET 4.5 Even this question references "ZipFile" in the source code. But I can't seem to find this class. How to

Decompress files with .7z extension in java

徘徊边缘 提交于 2019-11-29 15:25:15
Can someone advice (give example) any appropriate and understandable way how to extract file or files with .7z extension basing upon InputStream. I have been examined the XZ for java api, but couldn't succeed. Waiting for any suggestion. This code might help you. import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.RandomAccessFile; import java.util.Arrays; import net.sf.sevenzipjbinding.ExtractOperationResult; import net.sf.sevenzipjbinding.ISequentialOutStream; import net.sf.sevenzipjbinding.ISevenZipInArchive;

Correctly decoding zip entry file names — CP437, UTF-8 or?

≡放荡痞女 提交于 2019-11-29 13:47:14
I recently wrote a zip file I/O library called zipzap , but I'm struggling with correctly decoding zip entry file names from arbitrary zip files. Now, the PKWARE spec states: D.1 The ZIP format has historically supported only the original IBM PC character encoding set, commonly referred to as IBM Code Page 437... D.2 If general purpose bit 11 is unset, the file name and comment should conform to the original ZIP character encoding. If general purpose bit 11 is set, the filename and comment must support The Unicode Standard, Version 4.1.0 or greater using the character encoding form defined by

How to programmatically count the number of files in an archive using python

最后都变了- 提交于 2019-11-29 11:58:27
问题 In the program I maintain it is done as in: # count the files in the archive length = 0 command = ur'"%s" l -slt "%s"' % (u'path/to/7z.exe', srcFile) ins, err = Popen(command, stdout=PIPE, stdin=PIPE, startupinfo=startupinfo).communicate() ins = StringIO.StringIO(ins) for line in ins: length += 1 ins.close() Is it really the only way ? I can't seem to find any other command but it seems a bit odd that I can't just ask for the number of files What about error checking ? Would it be enough to

Python3: lzma unpack .7z file

允我心安 提交于 2019-11-29 03:37:11
I would like to unpack a .7z file. According to this question I can use the lzma package to do this. I was expecting something like import lzma #... with lzma.open('myFile.7z') as f: f.extractall('.') To extract the file into the current directory but it seems something like this does not exist. Furthermore trying something like import lzma #... with lzma.open('myFile.7z') as f: file_content = f.read() print(file_content) did yield _lzma.LZMAError: Input format not supported by decoder . How can I check the format? And I am quite surprised because I thought both 7zip and the .7z format are

Running 7-Zip from within a Powershell script

谁都会走 提交于 2019-11-29 01:09:20
I'm trying to use 7-Zip to backup some files inside a Powershell (v2) script. I have: $zipPath = "C:\Program Files\7-Zip\7z.exe" [Array]$zipArgs = "-mx=9 a", "`"c:\BackupFolder\backup.zip`"", "`"c:\BackupFrom\backMeUp.txt`"" &$zipPath $zipArgs; But when I run this I get: 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 Error: Incorrect command line Writing this to the screen I get: C:\Program Files\7-Zip\7z.exe -mx=9 a "c:\BackupFolder\backup.zip" "c:\BackupFrom\backMeUp.txt" So I assumed that I needed to put quotes around the path to 7z.exe, that gave me: $zipPath = "C:\Program

Unzip files (7-zip) via cmd command

蹲街弑〆低调 提交于 2019-11-28 16:26:31
问题 I try to unzip a file via CMD. So I install winzip (and its plugin to cmd), winrar and 7-zip. But when I try to execute a command via the CMD: 7z e myzip.zip It gives the next error: 7z is not recognized as an internal or external command In addition, I added the folder of 7-z to the environment variables (Properties--> advanced --> Environment Variables --> user variable --> choose path, and add C:\Program Files\7-Zip What can be the reason? 回答1: Doing the following in a command prompt works