Search code examples
exensisunzip

How do I access the directory of my NSIS Installer inside a Zip File to extract that Zip File?


I want to extract a ZIP File with the .exe inside. I want to execute the .exe inside the Zip to extract the Zip File.

Already tried it by executing: ZipDLL::extractall "$EXEDIR" "$DESTINATION" I think that does not work, cause the .exe is stored in the TEMP Folder when opened, so it cannot find the.Zip file

So how do I extract that Zip when executing the .exe from inside the Zip?

Thanks for answers!


Solution

  • Your question does not make a lot of sense, you should just put the files inside the installer and not have a zip file at all.

    Even if it made sense, it is not possible because where a exe is executed from when you double click it inside a zip file depends on the zip program you are using and there is no way of getting the path of the zip it was extracted from.

    If for some reason you want to be able to update the files inside the zip file without rebuilding the installer you can use a cab file instead. The CabX plug-in supports extracting from cab files appended to the installer exe.