gilllyo
10th November 2003 23:29 UTC
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.
Joost Verburg
11th November 2003 16:46 UTC
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.
gilllyo
11th November 2003 21:39 UTC
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
Joost Verburg
11th November 2003 22:31 UTC
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
gilllyo
13th November 2003 23:01 UTC
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.
gilllyo
14th November 2003 00:13 UTC
I actually re-organised my code so that the search was perfomed within the callback of detect drive
kukomamasan
17th March 2004 13:47 UTC
[edited-sorry wrong place to post]