stonkers
10th April 2006 20:21 UTC
InstallLib
I've been having a problem with InstallLib where it will register a dll, but not extract it. Is there a setting similar to setOverwrite for InstallLib? For one of my installers that uses InstallLib, it works fine in QA but when run on Staging or Prod, doesn't extract. Any help? Here's an example of the code:
CreateDirectory $INSTDIR\myApp
IfFileExists "$INSTDIR\myApp\myDll.dll" 0 +2
StrCpy $ALREADY_INSTALLED 1
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED NOREBOOT_NOTPROTECTED D:\myAppBuildDir\dll\myApp\myDll.dll $INSTDIR\myApp\myDll.dll %TEMP%
Thanks,
Eric
Red Wine
11th April 2006 11:08 UTC
did you try to delete the dll at runtime and check if you can?
clearerrors
IfFileExists "$INSTDIR\myApp\myDll.dll" 0 _new_installation
unregdll "$INSTDIR\myApp\myDll.dll"
iferrors 0 +4
detailprint 'something went wrong with unregdll'
detailprint 'try to unreg manualy e.g. regsvr32 /U and check if this works'
clearerrors
delete "$INSTDIR\myApp\myDll.dll"
iferrors 0 _new_installation
detailprint 'something wrong with delete try to replace on reboot'
StrCpy $ALREADY_INSTALLED 1
# replace on reboot and check if this works
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED
REBOOT_NOTPROTECTED D:\myAppBuildDir\dll\myApp\myDll.dll $INSTDIR\myApp\myDll.dll
_new_installation:
!insertmacro InstallLib REGDLL $ALREADY_INSTALLED
NOREBOOT_NOTPROTECTED D:\myAppBuildDir\dll\myApp\myDll.dll $INSTDIR\myApp\myDll.dll
stonkers
12th April 2006 17:33 UTC
Nope, but can try this. Do others of you do this? I thought that sort of gig was all handled by InstallLib...
bhaelochon
12th April 2006 18:11 UTC
I ran into the same issue, stonkers. I ended up having to insert an UnInstallLib before my InstallLib.
stonkers
12th April 2006 20:32 UTC
Cool thanks!
kichik
14th April 2006 11:14 UTC
What do you mean by registered but not extracted? Is it registering the old version? Try running it with a log and see if install.log shows anything of interest.
There's a problem with the InstallLib call. The last parameter should be $TEMP, not %TEMP%. It may be related.