Skip to content
⌘ NSIS Forum Archive

Extract compressed files by 7z.dll

7 posts

mbnoimi#

Extract compressed files by 7z.dll

Hi all,

I want to extract a specific password protected *.7z file by using 7z.dll so I've to use CallInstDLL because I couldn't find any NSIS plugin.

I tried to use:
Push "x"
Push "-t7z"
Push "files.7z"
Push "-psecret"
CallInstDLL "$INSTDIR\7z.dll" "IInArchive"
but it didn't work because of these two missing points:
  1. I don't know what's the needed 7zip function to make extract process
  2. I'm not sure what if I called CallInstDLL correctly or it?


Could you please help me?

I read these resources but they didn't help me here:
mbnoimi#
Guys could you please help me here🙄

I'm googling since two days but I failed to find any result.
Afrow UK#
Either use the Nsis7z plug-in or execute 7za.exe using ExecDos/nsExec. CallInstDLL isn't for calling non NSIS DLL files; it's the old way to call plug-ins (before we had the plug-in call syntax). If you must use 7z.dll you have to call it using the System plug-in.

Stu
MSG#
I've no idea what CallInstDLL is, or what its syntax is supposed to be.

To unpack 7z files, you can use 7za.exe. It's legal to redistribute, without giving credit, for both commercial and non-profit applications.

Note however that hackers will always be able to extract the password from your installer. Either they replace the exe/dll you're calling, or they just extract the script itself.
Yathosho#
Originally Posted by Afrow UK View Post
Either use the Nsis7z plug-in or execute 7za.exe using ExecDos/nsExec
unfortunately, that plugin still doesn't support any advanced 7-zip options such as extracting password protected files
mbnoimi#
Originally Posted by Afrow UK View Post
CallInstDLL isn't for calling non NSIS DLL files; it's the old way to call plug-ins (before we had the plug-in call syntax).
In there any way for calling DLL files (other than nsis pluings) by NSIS?
LoRd_MuldeR#
The "System" plug-in is for exactly that purpose. It's part of the official NSIS distribution.