Skip to content
⌘ NSIS Forum Archive

compress to a zip file with NSIS?

8 posts

xirisone#

compress to a zip file with NSIS?

Hi,

I want the installer to put some files on the target machine to a ZIP file -> compress, don't extract.

Can someone point me to the right direction? All I found so far is how to extract files )-:

xirisone
Afrow UK#
Best bet is to use the 7za.exe command-line tool that comes with 7-zip.
, archiver, compression, zip, best, compress, high, ratio, free, gnu, lgpl, unzip, far, win32, 7zip, long, file, names


Stu
xirisone#edited
Hmm... that would mean I put the 7za.exe into the installer and call it after the installer extracted it's files to some tmp-Dir?
Then I must call 7za.exe synchronously from within the installer, the files get zipped, 7za returns, the installer finished and deletes all tmp-files including the 7za.exe.
Is this the way?

TIA xiris

BTW: I didn't find "7za.exe" after installing 7-ZIP (7z456.exe). Only "7z.exe" is available but this file needs "7z.dll" as well.
Is there a seperate download for "7za.exe" ?
Afrow UK#
Get the command line version from the download page.
download, sources, free, gnu, lgpl, 7-zip, archiver, compression, software, compress, zip, unzip


Stu
meoit#
Put all your archivers in rar/7z, add password by using CommandLine. Load Function .OnInit for Installer.
Yathosho#
Originally Posted by meoit View Post
add password by using CommandLine.
That's a bad idea bacause it's very easy to snoop the password. Anyway, the OP never mentioned the need to use passwords.