Cannot Open NSIS file with 7z.dll

  • undefauth

    undefauth - 2013-09-23

    Hi, I'm having difficulty trying to open an NSIS file using 7z.dll. I try to open with CLSID_CFormatNsis but it fails (open fails with S_FALSE). I see that the NsisHandler uses the following signature:

    "#define NSIS_SIGNATURE { 0xEF, 0xBE, 0xAD, 0xDE, 0x4E, 0x75, 0x6C, 0x6C, 0x73, 0x6F, 0x66, 0x74, 0x49, 0x6E, 0x73, 0x74}"

    but all the NSIS files I wan't to open start with "MZ" (0x4D, 0x5A), is this the source of my problems, or are there any other suggestions? Any help would be much appreciated.


    Last edit: undefauth 2013-09-23
  • Igor Pavlov

    Igor Pavlov - 2013-09-24

    Does 7-Zip open that archive?

    7z.dll tries to find NSIS header after EXE stub.
    It searches the NSIS header only with 512 bytes steps.

    Try to compile 7z.dll in debug mode and trace to
    NsisIn.cpp: CInArchive::Open()

  • undefauth

    undefauth - 2013-09-24

    Found the issue, the second argument to open the archive was 0 (as is normally the case in Client7z.cpp) which worked fine for tar but was stopping the nsis archive handler.

    Thanks again for the the reply.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks