|
|
#1 |
|
Junior Member
Join Date: Feb 2005
Location: Italy
Posts: 42
|
How to pass LOCALFILE to Library.nsh as a variable
i wish to pass a dynamic foldername to upgrade all its DLLs/OCXs but i'm getting the error:
'!error: InstallLib 1: The library $5\$1 could not be found. Error in macro InstallLib on macroline 89'. Even tried to !define a custom var (i.e. var MyVar) and use it (with StrCpy $MyVar "c:\sourcedir": no way. I've read almost all relevant posts in this forum but i must admit i can't still understand where the issue is: i would really appreciate just some hints. Here below the abstract of the code i'm using. Thanks in advance. ;test upgrade all dll in a given folder !include Library.nsh var ALREADY_INSTALLED name "Get files test" outfile "testgetfiles.exe" InstallDir "$PROGRAMFILES\MyTest" Section -DoIt push "c:\sourcedir\winlib" call GetFiles SectionEnd Function GetFiles Exch $5 FindFirst $0 $1 "$5\*.*" loop: StrCmp $1 "" done StrCmp $1 "." readnext StrCmp $1 ".." readnext ifFileExists "$5\$1" 0 readnext StrCpy $ALREADY_INSTALLED 1 !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED "$5\$1" "$SYSDIR\$1" "$SYSDIR" readnext: FindNext $0 $1 Goto loop done: FindClose $0 FunctionEnd |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|