Archive: Finding files anywhere?


Finding files anywhere?
I Have a program that uses a Database. However this Database needs to be accessed by a number of different computers and providing a Database Server is out of the question. So we have put the file on a file server. How can we get the location of the Database file so we can make appropriate registry changes as apart of installing the program.


I don't really understand what you mean. If you want to detect the location of a database, you will at least need to have some information about where you can find it.


What I mean is...

It will be stored within a mapped network drive. I don't know what the drive letter is. So either I would need a function to search all drives or using a second directory page that you select a DB.

Either solution would be good. This is actually for a university project and I am a newbie but can manipulate some one elses code for my needs once I know whats happening


If you know the name of the computer you can use a path like \\computername\drive\dir\file.dat

If you really want to search all drives (then your installation will really take half an hour), you can find file search functions in the archive at http://nsis.sf.net/archive


I will only be searching network drives. They should not be that big.

I've used to DetectDrive And FindFiles from the archive to search on network drives. DetectDrive only returns one drive at a time.

I can't seem to find a simple looping mechanism in NSIS which really bugs me.

But I suppose I'll be able to check if there are no more drives and exit the when the file has been found.


I actually re-organised my code so that the search was perfomed within the callback of detect drive


[edited-sorry wrong place to post]