Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Portable release file on GitHub has misleading extension

Open alex-ilin opened this issue 3 years ago • 1 comments

If you go to GitHub's Releases page and download the portable file of the latest release https://github.com/rizonesoft/Notepad3/releases/download/RELEASE_5.21.1129.1/Notepad3Portable_5.21.1129.1.paf.exe.7z you'll get a file that seems to be a 7-Zip archive, not an executable, because it has the ".7z" extension.

In fact, the file is an executable, most likely a 7-zip self-extracting archive and not anything malicious, but I haven't tested it. How to check? Take a look inside with a hex editor: if the file starts with "7z", then it's an archive. If it starts with "MZ", it's an executable. Also, you may change the extension from "7z" to "exe" and run it. Archive would not run, but an executable would (not recommended to try this with any file you didn't create yourself).

alex-ilin avatar Feb 02 '22 18:02 alex-ilin

Hello @alex-ilin ,

See: "Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

How to extract Files from PortableApps.com executable format

The PortableApps.com executable format is nothing but an executable 7z-archive.

If you replace the extension (.exe) by '.7z' or append a '.7z' extension,
you can handle it like a normal 7z-archive.

You can extract, e.g. the 32-bit, Notepad3 version from archive path:
"Notepad3Portable_xxx.paf.exe.7z\App\Notepad3\x86\Notepad3.exe".

Replacing/Removing '.7z' extension back to '.exe' will make an executable,
which can be installed like all other PortableApps.com executable archives.

In other words:

  • the "Notepad3Portable_5.21.1129.1.paf.exe" is a "PortableApps (PAF) file. In fact, it is a "NSIS installer compressed with lzma.
  • As the "NSIS format" is almost similar to the ".7-Zip format", if you change (add or modify) the end ".exe" extension to ".7z", the result file becomes a "7-Zip archive " .

But you're right, on GitHub in the Notepad3 Releases page, all PortableApps (PAF) files must end with a ".exe" extension. 👍 The ".7z" extension should be reserved to issue #1129 and BETA/RC testers only !

I will correct it as soon as possible. 😏

hpwamr avatar Feb 03 '22 14:02 hpwamr