Archive: SearchPath


SearchPath
in the following script, can't get "SearchPath" to read. $INSTDIR keeps coming up empty (defaults to C:). i'm working with 5 different OS's & 4 different versions of MS Office. ".xls" files are in different locations. need script to search for the path of each file and set it as the "SetOutPath"....any suggestions?

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir $INSTDIR
ShowInstDetails Nevershow
SilentInstall silent

Section "MainSection" SEC01
SetOutPath $INSTDIR
SearchPath $INSTDIR UNTR.xls
SetOverwrite on
File "UNTR.xls"
SearchPath $INSTDIR Treated.xls
SetOverwrite on
File "Treated.xls"
SearchPath $INSTDIR HTOnly.xls
SetOverwrite on
File "HTOnly.xls"
SetOutPath $INSTDIR
SearchPath $INSTDIR WPM.xls
SetOverwrite on
File "WPM.xls"
SetOutPath $INSTDIR
SearchPath $INSTDIR Personal.xls
SetOverwrite on
File "..\Program Files\Microsoft Office\OFFICE11\XLSTART\Personal.xls"
SetAutoClose true
SectionEnd


SearchPath does not search for a file. See the NSIS Archive for file search functions.


thanks for the reply. doesn't SearchPath return the path of the file and assign it to the user variable "$INSTDIR"? looked through the archives for file search functions. very confusing....gonna keep looking.


It does not search the whole hard drive. Please see http://nsis.sf.net/archive.