Using Map Network Drive to access Shared folder

Using Map Network Drive to access Shared folder

I was reading about the different ways of Connecting to Shared Folders , one of them was Using Map Network Drive which states the follows :

Map a network drive if you want a drive letter and icon associated with a specific shared folder. This makes it easier to reference the location of a file in a shared folder. For example, instead of pointing to \Server\Shared_Folder_Name\File, you would point to Drive:\File. You use drive letters to gain access to shared folders for which you cannot use a universal naming convention (UNC) path, such as a folder for an older application.

can anyone please explain what does this part mean "You use drive letters to gain access to shared folders for which you cannot use a universal naming convention (UNC) path, such as a folder for an older application"

is it something related to the length of the share names that exceeds 248 characters in UNC ?

Regards

答案1

There are some applications that allow you to choose local paths only for finding or saving files/resources. An example of this is Microsoft Deployment Toolkit (MDT), such as when selecting a folder containing an application you wish to deploy during Windows installation on a new computer. In this example, the folder select dialog box only shows local paths, and does not allow the entry of a UNC path (such as \\server\share\application_source\).

When an issue like this arises, the only possible solution is to map the UNC path to a local drive letter first, then find it within the folder selection dialog box.

答案2

Cmd.exe, the interpreter used for .bat scripts, will refuse to use a UNC path as the working directory. Scripts started from a UNC location will use a different starting directory, trying to cd into a UNC path will fail, and pushd will in fact set up a drive-letter mapping temporarily.

32-bit Windows can still run many legacy 16-bit programs. I don't exactly remember whether UNC paths were directly usable on 16-bit DOS and Windows, but even if they had been, many programs of that era insisted on a drive letter being present. For example, some installers had separate fields for drive and path.

相关内容