Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 4th July 2001, 07:04   #1
akumaru
Junior Member
 
Join Date: Jul 2001
Posts: 1
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?
akumaru is offline   Reply With Quote
Old 5th July 2001, 09:23   #2
arune
Junior Member
 
Join Date: Apr 2001
Posts: 18
Send a message via ICQ to arune
This seems to work for me:

IfFileExists $SYSDIR\Mscomctl.ocx next1 inst1
next1:
CompareDLLVersions /STOREFROM prgfiles\Mscomctl.ocx $SYSDIR\Mscomctl.ocx inst1 skip1
goto skip1
inst1:
File prgfiles\Mscomctl.ocx
skip1:
nop

Maybe you must use the switch /STOREFROM ?
From documentation:

The /STOREFROM switch tells the compiler that dll1 is a file on the build system, at which the compiler will look to get the version information (if /STOREFROM is not specified, dll1 is a path on the target installing system).
Note: this command uses the win32 version resource to do its comparison - if either file lacks a version resource, the function will fail (no goto, error flag set).

/arune
arune is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump