Skip to content
⌘ NSIS Forum Archive

Installer cannot not load NSISdl.dll

3 posts

uckelman#

Installer cannot not load NSISdl.dll

An installer I built for a Java program downloads and installs the JRE if the user doesn't have it already. I'm using NSISdl::download in my installer script. The part I believe is relevant is quoted here:

!define JRE_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=52247"

StrCpy $0 "$TEMP\jre_installer.exe"
NSISdl::download /TIMEOUT=30000 ${JRE_URL} $0
Pop $R0 ; Get the return value
StrCmp $R0 "success" +3
MessageBox MB_OK "Java download failed: $R0"
Quit
When this code executes in our installer built with NSIS 2.46, I get this message in the MessageBox:

"Java download failed: /TIMEOUT=30000"

However, the message appears immediately, not after 30 seconds. If I remove the timeout argument $R0 in the message is the URL instead. It appears that the call to NSISdl::download is failing and its first argument ends up on the stack.

When this happens, the message above the progress bar is:

"Could not load: C:\DOCUME~1\Joel\LOCALS~1\Temp\nsv3.tmp\NSISdl.dll"

That DLL is not missing---it's in the indicated directory at the time when the install fails.

This worked with installers we've built with older versions of NSIS (I'm unsure what the last working version was, but I intend to find out later today). Does anyone know the cause of this problem? Is it an NSIS bug?
Afrow UK#
Have you tried inetc instead? It may be Antivirus software blocking the DLL as there has been malware with the same name.

Stu
uckelman#
I just now found the solution:

When I build the installer with a 2.46 that I built myself, it works. When I use the one provided by Fedora's mingw32-nsis package, I get the bug I described above. Ergo, I think Fedora's mingw32-nsis package is hosed.

I've reported the bug to them, so hopefully it will be fixed: