stevepedwards.com/DebianAdmin linux mint IT admin tips info

Cool Cmd #5 – 7z e Name.exe

Reviewing old files recently I found some old Cisco course syllabus files on my Storebird drive (attached to Mint) which are Windows.exe type installer files. To be able to get a glimpse of what they are, without installing them on a Win PC, I found this:

sudo apt-get install p7zip-rar

Once installed, read the man page:

IomegaMint semester1 # man p7zip
DESCRIPTION
7-Zip is a file archiver with the highest compression ratio. The proâ
gram supports 7z (that implements LZMA compression algorithm), LZMA2,
XZ, ZIP, Zip64, CAB, RAR (if the non-free p7zip-rar package is
installed), ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem
images and DEB formats. Compression ratio in the new 7z format is
30-50% better than ratio in ZIP format.

p7zip is a gzip-like CLI wrapper script for 7zip

FUNCTION LETTERS
-d Decompress file

-h, --help
Print usage

SEE ALSO
7z(1), 7za(1), 7zr(1), bzip2(1), gzip(1), zip(1)

AUTHOR
Written for Debian by Mohammed Adnene Trojette.

Mohammed Adnene Trojette October 31 2004 p7zip(1)

To extract a Win.exe you need to run the "e" switch not mentioned above, e.g.:

7z e en_curriculum1_v212iCopy.exe

Note I made a copy of the original .exe first to not risk corrupting the original if it went wrong.

Now I can view them in the Win share and partly run (without Flashplayer 5) the html files in a browser.

WinshareView.jpg

CiscoNoFlash.jpg

A very handy tool - for extracting a Win driver using a Linux PC etc?

Hmm...MAYBE NOT! I just checked the decompression by running the index.html file that this unpacked, and it left unfilled image place holders, which I initially assumed was because this Cisco package needs Flashplayer5 - but on checking on a Win7 PC, which called WinRAR to unpack the .exe, I COULD view the index.html page properly, so it seems there is something buggy with the p7zip program or "e" is the wrong switch - even though -d for decompress did not work also.

I even re-ran it on a different semester.exe (there are 4 in total) and had the same issue so it was not a one off corruption the first time.

Beware.

Shame - it would have been a COOL Cmd...
I'm sure there is another that I used to know for Win.exe's - "unpack" or such..?

Comments are closed.

Post Navigation