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

UNC Path Vs. Mapped Drives 2

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
0
36
US
I have an app that is being run on client computers connected to a Win 2003 server. I also have a few users connecting using Terminal Server. Each of the computers has several mapped drives that are used in the app to allow access to read/write various files, etc. I would like to use the UNC path to avoid the mapping issue of making sure everyone has the same mapping. Are there any good reasons for or against using the UNC? Is there anything to watch out for when using the UNC?

Auguy
Sylvania/Toledo Ohio
 
I prefer to use UNC paths when able. It clears up any confusion as to which drive letter on which machine needs to be used. The File Object can handle the UNC path names.

--------------------------------------------------
Stubbornness is a virtue -- if you are right. --Chuck Noll
--------------------------------------------------
 
Thanks, I've seen some reports on the web that indicate UNC paths are slower than mapped drives in some cases. have you observed anything like that?

Auguy
Sylvania/Toledo Ohio
 
Only when dealing with optical drives (DVD, CD, etc.). I used to do database conversions with imaged documents. We used Windows PC and SUN Servers. The only way to effectively navigate was with UNC paths. Processing through literally millions of images on the Suns never caused any delays. We had a couple of Windows servers. We mapped drives and used UNC with those. There was rarely a noticeable difference. In fact, the Suns typically responded faster. It really comes down to the hardware based on my experiences.

To answer your question, is the difference noticeable? I haven't ever seen it.

--------------------------------------------------
Stubbornness is a virtue -- if you are right. --Chuck Noll
--------------------------------------------------
 
Thanks Again!

Auguy
Sylvania/Toledo Ohio
 
I'll give two pieces of advice with the second one first. The second piece of advice is that I would like to point out one thing that too many people tend to forget. The point and continued use of a map drives is so that if and when a path changes nothing has to be updated on the users end except that map. Programs don't have to be updated, installs that look for the original install location do not have to be redone, etc. If a network change is made your users and you or whomever would need to make sure that the program(s) are reinstalled on each computer doesn't have to go through that for each one. Unless you have a true need to use a UNC path you should never use one.

The first piece of advice. If you are thinking about hard coding a path in your program then you should roll up a newspaper, hand it to the first available person, and have them whack you on the nose.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Thanks Sorwen. I have local network users and two sets of users using Terminal Servers to run the application. I thought it would be easier to use the UNC rather than making sure all of the mapping is correct on all of the conputers. I was storing the mapped drive info in global constants set at the startup of the program. I'm going to move all of the UNC paths to a SQL table in case there are any changes to the paths. As to your first piece of advice, I'm going to hide the newspaper until this is complete.

Auguy
Sylvania/Toledo Ohio
 
Auguy.... putting the parent pathing in a table is the best route to go with. A single update to the table if the file(s) ever get moved. It also requires zero intervention on the user's part to realign the mapped drives.

--------------------------------------------------
Stubbornness is a virtue -- if you are right. --Chuck Noll
--------------------------------------------------
 
I agree putting paths in a table can be very useful. I've done that for a few of the programs my users run in the past.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top