One of the most common administrative configurations of desktop machines is the use of network drive mappings—assigning a drive letter on a workstation to a share on a server. Most people are used to drive letters rather than the servershare naming convention (referred to as UNC shares) and some programs won't recognize UNC shares, either.
There is more than one way to go about assigning drive letters on a desktop machine. The most common and familiar is the use of persistent connections, where a drive letter is mapped to a share and the machine is told to reconnect this share at the next logon. However, many administrators run into conflicts between persistent shares set up by the user and shares mapped by the administrator. A directory may be mapped first to one share and then re-mapped to another without warning.
One possible way to avoid this is to force persistent connections off, which can be done by simply adding a few lines of code at the start of the user's logon script.
net use /persistent:no
net use * /delete /y
This disables persistent connections entirely (the first line) and also deletes any existing drive mappings that have already been created. The administrator can then proceed to add into the script whatever mappings should be created through the net use command.
To disable persistent connections in the Registry for the current user, go to
HKEY_CURRENT_USER\Software\MicrosoftWindowsNT\CurrentVersion\NetworkPersistent Connections and edit the SaveConnections value; set it to no.
Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter. Check out his Windows 2000 blog for his latest advice and musings on the world of Windows network administrators – please share your thoughts as well!