akumaru
4th July 2001, 07:04
I have an application that needs certain dll files and I can't get NSIS to check if the DLL already exists on the client computer, ifexists then check the dll version, and copy it to the $SYSDIR. Here's what I had for the code:
IfFileExists "$SYSDIR\iphlpapi.dll" lbl_compare1 lbl_update1 lbl_compare1:
CompareDLLVersions "$SYSDIR\iphlpapi.dll" "F:\my documents\app\iphlpapi.dll" Next1 lbl_update1
lbl_update1:
SetOutPath $SYSDIR
File "F:\my documents\app\iphlpapi.dll"
RegDLL "F:\my documents\app\iphlpapi.dll"
Next1:
;DetailPrint "......iphlpapi.dll is up to date"
It doesn't copy the files if it doesn't exists and doesn't seem to check version correctly, but AFAIK the code is correct. Can anyone help?
IfFileExists "$SYSDIR\iphlpapi.dll" lbl_compare1 lbl_update1 lbl_compare1:
CompareDLLVersions "$SYSDIR\iphlpapi.dll" "F:\my documents\app\iphlpapi.dll" Next1 lbl_update1
lbl_update1:
SetOutPath $SYSDIR
File "F:\my documents\app\iphlpapi.dll"
RegDLL "F:\my documents\app\iphlpapi.dll"
Next1:
;DetailPrint "......iphlpapi.dll is up to date"
It doesn't copy the files if it doesn't exists and doesn't seem to check version correctly, but AFAIK the code is correct. Can anyone help?