Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 1st May 2001, 10:27   #1
soup-a-stu
Junior Member
 
Join Date: May 2001
Location: Mansfield, England
Posts: 1
Send a message via ICQ to soup-a-stu Send a message via AIM to soup-a-stu Send a message via Yahoo to soup-a-stu
is it possible to extract DLL files to the system directory, but only if they don't already exist?
soup-a-stu is offline   Reply With Quote
Old 1st May 2001, 10:57   #2
dTomoyo
Junior Member
 
Join Date: Mar 2001
Location: South Korea
Posts: 26
Send a message via ICQ to dTomoyo
Quote:
Originally posted by soup-a-stu
is it possible to extract DLL files to the system directory, but only if they don't already exist?
code:

1) IfFileExists $SYSDIR\target.dll CheckVer InstNewVer
2) CheckVer:
CompareDLLVersions source.dll $SYSDIR\target.dll InstNewVer SkipInst
3) InstNewVer:
SetOverwrite try
SetOutPath $SYSDIR
File source.dll
4) SkipInst:



1) if target.dll existed? goto CheckVer, else goto InstNewVer.
2) Compare DLL Version.
3) Install new version.
4) exit.

My trick...

dTomoyo is offline   Reply With Quote
Old 1st May 2001, 17:08   #3
justin
Moderator Alumni
 
Join Date: Apr 2000
Location: USA
Posts: 315
That actually won't work, because CompareDLLVersions compares two DLLs on the _target_ system.

What you have to do is this:
code:

; will update $SYSDIR\target.dll with my_updated_target.dll
SetOutPath $TEMP
File my_updated_target.dll
IfFileExists $SYSDIR\target.dll CheckVer InstNewVer
CheckVer:
CompareDLLVersions $TEMP\my_updated_target.dll $SYSDIR\target.dll InstNewVer
Goto SkipInst
InstNewVer:
Rename /REBOOTOK $TEMP\my_updated_target.dll $SYSDIR\target.dll
Goto End
SkipInst:
Delete $TEMP\my_updated_target.dll
End:


justin 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