Skip to content
⌘ NSIS Forum Archive

InstallLib always sets the error flag

8 posts

ovatsus#

InstallLib always sets the error flag

Hi, I'm doing this:

!define LIBRARY_COM
!insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED "${source}\my.dll" "C:\Program Files\MyProgram" "C:\Program Files\MyProgram"
!undef LIBRARY_COM
IfErrors +1 +2
MessageBox MB_OK "Failed to register mydll.dll"

This command copies the dll to its location, but then I always get the messagebox popup, because it returns an error. The dll didn't existed before, so it's impossible to have been locked.

This is in a windows xp machine using nsis 2.27.

Can someone help me please?

Best Regards,
Gustavo Guerra
Afrow UK#
Perhaps placing some IfErrors in the InstallLib macro followed by some MessageBox's will tell you what is causing the error flag to be set.

Stu
ovatsus#
Yes, that was what I have done, that how I found out with was the dll that made InstallLib set the error flag, but how can I find why?

Best Regards,
Gustavo Guerra
kichik#
Is the reboot flag set as well? It might be because it couldn't overwrite at the moment. Also, does my.dll have DllRegisterServer exported?