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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drive mapping at runtime

Status
Not open for further replies.

cvgalante

MIS
Jun 27, 2002
18
0
0
US
Does anyone know how to map a drive from within a Delphi program? For instance, map F: to \\server\sharename\folder1. One reason I want to do this is to test my program's ability to see the other machines on a network before I try database operations in a changing or uncertain environment. I frequently have to access multiple remote servers and perform queries, etc. on the data files on these servers. I suppose I could just test using connect:=true from a Tdatabase component, but surely there is a way to invoke the standard network drive mapping procedure?

I have looked through the Windows SDK help without success, but I could be missing something obvious. If the answer involves calls to Windows procedures, some actual code would be appreciated. Thanks in advance for the help.

Carl
 
Opp,

Thanks for the link. I will try this out. Actually, I don't need permanent drive mappings, just temporary while my process runs. The ability to supply a network user id and password to log into the remote server to begin with is what is crucial to me.

Again, thanks for the quick response.

Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top