Unpack NSIS executable

1

I am trying to decompress a NSIS executable. With the GUI version of 7zip I am able to do this and the exe is listed as:

Type = Nsis
Method = LZMA:25
Solid = +

With the command line version 7za I am unable to do this, but it is strange, since it is possible to compress with 7za using -m1=LZMA:d=25

Any idea to decompress or any alternative to 7za?

antonio

Posted 2013-01-11T10:14:17.570

Reputation: 647

@Karan As far as I know, there's no legal issue since 7zip is basically LGPL. (Source: 7-Zip License for use and distribution ) If the executable goes to a third party they can request the source code, but you are probably in the case where it is enough to add a notice text file telling them where you got the executable, since the source will be available there, too. See details in ref esp. section 6. Disclaimer: I am not a lawyer.

– Stéphane Gourichon – 2016-01-12T21:43:02.477

"With the GUI version of 7zip I am able to do this" - So what's the problem? Are you specifically looking to do this from the command-line only? Isn't using the GUI 7z.exe from the command-line an option? – Karan – 2013-01-13T18:18:54.447

1@Karan: yes I need to automate the task and execute it on a PC where I cannot assume 7zip is installed. – antonio – 2013-01-13T18:32:39.820

I'm not sure about the legality, but perhaps 7z.exe might work without even being installed? – Karan – 2013-01-13T18:35:14.657

Answers

2

There is a separate different portable version of 7-zip by a third party. http://portableapps.com/apps/utilities/7-zip_portable

This one can be put on a USB drive and the 7z.exe can be used much like 7za.exe, but it is able to cope with NSIS exe files.

I also found that, after installing the standard 7-zip from http://www.7-zip.org, one can grab and put 7z.exe and 7z.dll in whatever directory and s/he has her/his own light but full fledged command line version of 7-zip.

Pity that there is still to go with the main file plus the dll. Instead 7za.exe has no dependencies.

If you know of a static linked version of 7z.exe (no dll) or a trick to make a single executable out of them, please let me know.

cheers

antonio

Posted 2013-01-11T10:14:17.570

Reputation: 647