|
|
#1 |
|
Junior Member
|
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? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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 |
|
|
|
|
|
#3 |
|
Junior Member
|
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?
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
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 |
|
|
|
|
|
#5 |
|
Junior Member
|
and how could i manually locate a file? like with file-open dialog....?
|
|
|
|
|
|
#6 |
|
Major Dude
Join Date: Jul 2004
Posts: 671
|
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 |
|
|
|
|
|
#7 |
|
Junior Member
|
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? |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Jul 2004
Posts: 671
|
Whereas, process of searching for occupies much time (on all HDD), I have thought better to add banner (use NSIS 2.04).
|
|
|
|
|
|
#9 |
|
Major Dude
Join Date: Jul 2004
Posts: 671
|
Modern UI script version:
1. Modern UI custom page 2. Start search button 3. Banner shows search in directory |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|