Archive: UpgradeDLL could not load ?!?


UpgradeDLL could not load ?!?
I try to use the UpgradeDll macro to install a DLL.

I use the following syntax :

!insertmacro UpgradeDLL "OUTLOOK2000\outlookclientaddin.dll" "$INSTDIR\outlookclientaddin.dll" "$INSTDIR"
But the registration is not done. The log tells me : "Could not load C:\Program Files\Outlook Synchronization Addin\outlookclientaddin.dll"

I checked that the DLL was at its place when the call to RegDll occurs, and it is.

The same problem occurs with short file names too.

Has someone had the same problem ?

Arnaud

Here is the script I use.

outlookclientaddin.dll is dependant of dll2000.dll.

SetOutPath "$INSTDIR"
SectionIn 1 RO

File /oname="AddinToolbarRemover.exe" "OUTLOOK2000\addintoolbarremover.exe"
File /oname="README.TXT" "Common\README.TXT"
File /oname="COPYING" "Common\COPYING"

!define UPGRADEDLL_NOREGISTER
!insertmacro UpgradeDLL "OUTLOOK2000\dll2000.dll" "$INSTDIR\dll2000.dll" "$INSTDIR"
!undef UPGRADEDLL_NOREGISTER
!insertmacro UpgradeDLL "OUTLOOK2000\outlookclientaddin.dll" "$INSTDIR\outlookclientaddin.dll" "$INSTDIR"
Hope this helps...

I had that problem once because the DLL I was trying to load was dependent on another DLL. I ended up having to include both DLLs in the folder I was calling the first one from and then SetOutPath to that folder. I've never used the upgrade DLL but maybe it calls the DLL to determine it's version and that causes it's dependency to be needed. You could also use Dependency Walker to determine if that DLL has other dependencies. I made a post several weeks ago with the problem I discussed above if you think the problems are related and want more info.


Thanks for your response.

The Dll on which the Dll I try to register is dependant is in the same directory, INSTDIR, and SetOutPath is set to this directory.

Some tests I've done :
UnRegDll works on the same dll.
regserv32 works after the installer is closed, but not if I call it with ExecWait.

Any ideas ?


Sorry, I have no more ideas. I used your code with 2 DLLs I have here and it worked fine. Both files were copied in and it registered the second one. However, neither of my files were dependent on one another.