ovatsus
27th May 2007 22:37 UTC
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
28th May 2007 12:24 UTC
Did you use ClearErrors before using InstallLib?
Stu
ovatsus
28th May 2007 16:42 UTC
yes
Afrow UK
29th May 2007 11:34 UTC
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
29th May 2007 12:08 UTC
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
7th July 2007 09:48 UTC
Does it happen without LIBRARY_COM as well?
gugu
7th July 2007 15:45 UTC
Yes
kichik
7th July 2007 17:45 UTC
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?