- NSIS Discussion
- Another search for file question
Archive: Another search for file question
kukomamasan
3rd February 2009 16:42 UTC
Another search for file question
Hi,
Im having difficulty to search for a file question :-).
I searched through forum, on how to do this and i diden't find any answer.
Since most search question is like 4 or 5 years old, maybe it got easier to search for a specific file on all harddrives / partitions ? if it is, plz tell me in details thx
Also, im pretty sure the file i search for is not in windows folder, and it is not a system or hidden attribute file, so how to make the search faster by deselect that ?
Thx in advance
Egil
Animaether
3rd February 2009 16:48 UTC
http://nsis.sourceforge.net/Category...File_Functions
http://nsis.sourceforge.net/Search_f..._or_Directory_(Alternative)
Practically all the 'find file' functions let you start in a specific folder - just specify "d:" if you want to search all of the D drive.
kukomamasan
3rd February 2009 16:57 UTC
ok both url dont work here : i got There is currently no text in this page, you can search for this page title in other pages or edit this page.
Retrieved from "http://nsis.sourceforge.net/Search_for_a_File_or_Directory"
I got that alot from any links , dunno why ?
Also specify a drive is no good, i dont know where it is or what drive / partitions, thats why i want to search for it :-) (i think its possible to have 255 drives / partitions in xp, im not gonna make a line for all possibilities hehe)
Also in ntfs there is a MFT tabel, dont it record what file name is stored on the drive ? , so instead of doing a physical search that make take minutes to complete, can't you not just find the file, by looking inside the MFT ?
Animaether
3rd February 2009 17:08 UTC
beh, darn forum software cut off the link at the opening parenthesis. The full link is "http://nsis.sourceforge.net/Search_for_a_File_or_Directory_(Alternative)".
As far as I know, the host operating system will automatically use the filetables when simply looking for files, rather than editing them, but if it doesn't then there's a good chance you'd have to program your own plugin to achieve this.
kukomamasan
3rd February 2009 17:11 UTC
Thx for the help so far, i can hardly make an installer, programming lol, im lost :-)
And link is just what i was talking about, its pretty complicated, and it requires the drive to be known where to start searching, like i said there could be 255 drives(probably only a few, but better safe than sorry).
Animaether
3rd February 2009 17:39 UTC
well you could use...
http://nsis.sourceforge.net/GetDrives
or
http://nsis.sourceforge.net/Detect_Drives
...to get at the drives actually present.
But if you have to look through entire drives - and then *all* drives - to find a particular file you might ask yourself if it is really the place of an installer to do so; could you check the most common locations (perhaps based on registry information) and -if not found- prompt the user to specify the location instead, for example?
kukomamasan
5th February 2009 15:21 UTC
Ok, thx, but i think it's getting to complicated, i just hoped a plugin was made that only required a few lines.
Reason i would like to search for the file (as an option, i do look in reg and allow to browse), is that maybe the user don't even know where the program is located.
Animaether
5th February 2009 18:44 UTC
well, it's not all that complicated - it does require you to sit down and do some coding, of course... but that's NSIS for ya.
InstallShield et al may have a 'find a file' component that would be easier to implement... less flexible, but easier. But I wouldn't know that for sure :)