Old 10th November 2003, 22:29   #1
gilllyo
Junior Member
 
Join Date: Nov 2003
Posts: 4
Question 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.
gilllyo is offline   Reply With Quote
Old 11th November 2003, 15:46   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
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.
Joost Verburg is offline   Reply With Quote
Old 11th November 2003, 20:39   #3
gilllyo
Junior Member
 
Join Date: Nov 2003
Posts: 4
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
gilllyo is offline   Reply With Quote
Old 11th November 2003, 21:31   #4
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
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
Joost Verburg is offline   Reply With Quote
Old 13th November 2003, 22:01   #5
gilllyo
Junior Member
 
Join Date: Nov 2003
Posts: 4
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 is offline   Reply With Quote
Old 13th November 2003, 23:13   #6
gilllyo
Junior Member
 
Join Date: Nov 2003
Posts: 4
I actually re-organised my code so that the search was perfomed within the callback of detect drive
gilllyo is offline   Reply With Quote
Old 17th March 2004, 12:47   #7
kukomamasan
Member
 
Join Date: Mar 2004
Posts: 62
[edited-sorry wrong place to post]

Last edited by kukomamasan; 17th March 2004 at 14:24.
kukomamasan is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump