Archive: locating files


locating files
hi i need the following:

on a extra page, lovate all occurences of a specific file and display a selection box where user can choose one entry...

i guess i have to use locate, but i can't figure out how.. I'm a newbie... Can someone helpme?


You'll need to make a custom page with InstallOptions (Contrib\InstallOptions) that has a ListBox control on it.
To find files on your hard drive, there's two functions in here:
http://nsis.sourceforge.net/archive/...instances=0,11

-Stu


ok. now i have a custom page, but how do i manage to disable 'next' button, and start searching filesystem with a seperate custom button, and fill the listbox?


You can disable the Next button by using EnableWindow:

GetDlgItem $R0 $HWNDPARENT 1
EnableWindow $R0 0

To make a button call a Function, see the testnotify.nsi example script (in the InstallOptions dir).

-Stu


and how could i manually locate a file? like with file-open dialog....?


Algorithm of this script:

1. Find files in specified directory.
2. Add founded files in List Box.
3. You must select one to enable Next button
4. If file deleted (since it found) then:
   -Next button - disable
   -Not existed file will deleted from List Box

Script used header


Hi,

GREAT! Big thx! almost exactly what i needed :)

I need to search all lokal HDD so i guess GetDrives i have to use, too. But it does it only for the first Drive in my test. i put your $locate in the callback-Function of GetDrives... is that wrong?


Whereas, process of searching for occupies much time (on all HDD), I have thought better to add banner (use NSIS 2.04).


Modern UI script version:

1. Modern UI custom page
2. Start search button
3. Banner shows search in directory