Some questions about macro InstallLib
Hi,
Some questions about macro InstallLib:
(Q1:)Why the case1 gives troubles when case2 operates smoothly?
case1
------
; HM NIS Edit Wizard helper defines
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\MyApp.exe"
.....
.....
!include "Library.nsh"
.....
.....
InstallDir "$PROGRAMFILES\MyApp"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
....
Var ALREADY_INSTALLED
Var IsPresent
Function .onInit
....
;Check if product already installed...
ReadRegStr $IsPresent HKLM "${PRODUCT_DIR_REGKEY}" ""
....
FunctionEnd
Section -System
StrCmp $IsPresent "" +2 0
StrCpy $ALREADY_INSTALLED 1
!define LIBRARY_COM
!insertmacro InstallLib REGDLLTLB $ALREADY_INSTALLED REBOOT_NOTPROTECTED \
"E:\MyDLLS\MyDll.dll" "$INSTDIR\MyDll.dll" "$INSTDIR"
SectionEnd
Section APP
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
;... other app. files here...
.....
SectionEnd
case2
------
Only the following line is different, all other things are same as case1:
!insertmacro InstallLib REGDLLTLB $ALREADY_INSTALLED REBOOT_NOTPROTECTED \
"E:\MyDLLS\MyDll.dll" "$SYSDIR\MyDll.dll" "$SYSDIR"
There is no problem with case2.
In case of case1, the (-)system section fails (actually skipped as the log says...), when the installer is ruuning for the first time. However on 2nd time (or 3rd, 4th...etc.) it behave correctly. So what's gone wrong in 1st. time?
(Q2:)What to do if I have to install and uninstall both COM and NO-COM dlls at the same time?
------------
NSIS:2.0.6
OS:Win98SE
------------
Thanks,
playwin2