Archive: Help - Locate plugin


Help - Locate plugin
Good morning Friends,
Can anyone help me on locate plugin. I would like to search a folder with name AMR and write the output in a file. Here with the below code it is prompting me to verify in C: and again my in D:, I want to search my installer in silent mode and write in log file without any message boxes.

Can you please help me to change the code.

===========================================

outfile "test.exe"
;Output file which tells NSIS where to write the installer
ShowInstDetails Show
;Sets whether or not the details of the install are shown

!include FileFunc.nsh
;Header File
!insertmacro Locate
;Locate different features
!insertmacro GetDrives
; To find the drives in the system


Section
${GetDrives} "HDD" "GetDrives_CallBack"
SetOutPath "$R0"
DetailPrint "$OUTDIR"
DumpLog::DumpLog "C:\log.txt" .$$R0
SectionEnd

Function GetDrives_CallBack
StrCpy $R1 "$9"
StrCmp "$R1" "$R2" +3
MessageBox MB_YESNO "Search in $R1 hard disk?" IDYES +2 ;-- AM
goto end
${Locate} "$R1" "/L=D /M=AMR" "Locate_CallBack"
;${Locate} "[Path]" "[Options]" "Function"
StrCpy $R2 "$R1"
IfErrors 0 +2
MessageBox MB_OK "Error" IDOK +2 ;-- AM
MessageBox MB_OK "$$R0=$R0" ;-- AM
end:
Push $0
FunctionEnd

Function Locate_CallBack
StrCpy $R0 $R9
;MessageBox MB_YESNO '$R0$\n$\nFind next?' IDYES +2
StrCpy $0 StopLocate
Push $0
FunctionEnd

/**Section
${GetFileVersion} "$R1" $R0
; $R0="1.1.0.12"
SectionEnd**/



Logfile:
Output folder: C:\Program Files\AMR
D:\Program Files\AMR

here i need the log file output only the folders information like below

C:\Program Files\AMR
D:\Program Files\AMR

Please help me.


Can any one help me on suppresing the message boxes in the above code and write the output in a log file as required.

Thanks in advance.