Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I detect available drives in Delphi?

Status
Not open for further replies.

CHeighlund

Programmer
Jun 11, 2007
163
US
I am working on a program designed to map a networked drive to a Linux Samba share. I have been requested to give the end users a way to select what drive they want to map. I know that some drives are off limits for use; (A:, C:, and the F:, I:, and L: drives we currently have mapped to servers elsewhere), but I'd like to be able to prevent other mapping conflicts as well. (Second CD/CDR/DVD drive, plugged in flash drives or zip drives, or even someone trying to run multiple copies of this program.) Does anyone here know of any way to do this in Delphi, or any components which can add this capacity to a program? And if so, would you please share it/them?

Thank you for your consideration.
 
The answer(s) depends heavily on the OS(s) installed on the PC(s) this application will run on.

Roo
Delphi Rules!
 
All systems it will be installed on are running Windows XP, and there is no plan at this time to change over to Vista. Sorry I forgot to mention that earlier.
 
I have found mapping to be fraught with problems. for example lost mapping are difficult to re-map and the process can be slow.

If you use the ShellTreeview and ShellListview components (on the samples tab usually) these will give users of your program access to any Networked drives they can access through Windows Explorer. You can add your own restrictions as required.


Steve [The sane]: Delphi a feersum engin indeed.
 
I wrote an FAQ a few years ago which might be of some use to you:
faq102-3246

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top