Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


June 2003

The Magic of Drive Mapping

Give users fast, easy access to network resources
RSS
Subscribe to Windows IT Pro | See More Systems Administration Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Using Mapped Files for Backups

Download the Code Here

Kerberos and Mapped Drives
In a Win2K domain, the Kerberos authentication functions determine whether you can access shares. Kerberos relies on the Windows Time Service during authentication, and if the local computer's clock doesn't show the same time (within a certain tolerance) as the remote computer's clock, Kerberos won't let you access shares on the remote computer.

The default behavior of a Win2K computer in a Win2K domain is to sync its time with the DC's time every 45 minutes. When the clock times match, the synchronization interval is incrementally extended until it reaches 8 hours or until the clocks don't match. (For details about how Windows Time Service works, see Windows 2000 Ready, "Windows Time Synchronization Service," http://www.winnetmag.com, InstantDoc ID 8383.) If you've changed that paradigm, if a computer's clock is losing time because of semiconductor problems, or if the DC's time is wrong, Kerberos settings cause mapped drives to be disconnected.

I learned this accidentally while writing a book about accounting software. Every transaction window in accounting software has a date, so to make sure the book's figures would match the publication date, I set the date on the computer that was running the accounting software to the next year. I saved the figure files to a mapped drive on the computer on which I do my writing. When I finished writing the paragraphs and returned to the computer that was running the accounting software, I found that it had reset its date to the current year. I remembered that the workstation was syncing its time to the DC. The solution, I decided, was to change the system time, then grab the figure before the system next checked its time against the DC's time. However, when I attempted to save the figure file to the mapped drive, I received an error message about security and learned that the mapped drive was disconnected. I couldn't reconnect the drive until I fixed the time. Finally, I logged on to the local computer instead of the domain, saved the figure files locally, logged on to the domain again, then used Windows Explorer to transfer the files to the mapped drive.

A Mapped-Drive Bug
When you map a drive from the GUI, Windows opens a window for the new mapped share as soon as you click Finish. Thereafter, whenever you map that same drive letter, even from the command line, Windows opens a window and displays the contents of the shared resource. If you subsequently use a batch file to map the drive, the appearance of the window interrupts processing (defeating the purpose of an "unattended" job).

To prevent this behavior, Microsoft issued a downloadable fix, which you can obtain by calling Microsoft support. (If you report this problem, you won't be charged for the call.) The support technician will direct you to the proper FTP download of a replacement for the shell32.dll file. The Microsoft article "Mapping a Drive from a Command Prompt May Open a New Windows Explorer Window" (http://support.microsoft.com/?kbid=290703) discusses this problem and suggests a registry fix. However, the suggested registry modification doesn't work.

One way to prevent this behavior is to use only the Net Use command, never the GUI, to map drives. Alternatively, if you use the GUI, press and hold Shift when you click Finish and continue to hold down Shift for at least 10 seconds.

A Powerful Combination
Mapped drives combine computing power with ease of use—a potent combination. Use batch files and logon scripts to share this often overlooked power tool with your users—or teach them to map their own drives—and you as well as they will reap the rewards.

End of Article

   Previous  1  2  3  [4]  Next  


Reader Comments
This article has been very useful.
Thanks.

Eloy March 08, 2004


I like the article. I have used up every letter in the alphabet with my drives. Do you know how I can map more drives? Is there a command in Windows that will maybe let me use letters such as 'AA', 'BB', CC' and so on? If not, is there software I can purchase that will help me accomplish this objective?

David Meyer March 17, 2004


For the last few days, we've had a PC start up with mapped drives disconnected. Your article reminded me about the need for clock synchronization. Ours had gotten a little off. Thanks.

Gary Vetter March 24, 2004


to david meyer
Don't undestand the problem of mapping drive number.
I mount my vols under directory as permitted since w2k

cezanna March 30, 2004


I am told that in the world of MS, where a server is sharing its drive for applications, when a client runs the application, the application actually runs on the server and therefore uses the server's CPU, Memory resources. This is certainly not true in the Unix world, though it may use a little CPU, and memory as well as I/O bandwidth for the over head of sharing out its drive. In regards to Windows, can you confirm where the application actually runs or point me to some documentation that explains this?

Ron Bogard April 15, 2004


Any one knows how to rename (label) a network drive, using command line ?
Usually the drive is called: folder on server (letter driver), I wolud like to rename it in FOLDER1 as you can do in driver properties with LABEL box.

Thanks in advance
P.

Paolo April 20, 2004


Very informative. I grew up in the DOS world. Since GUI the DOS commenads have not gotten daily use. This really helps with the "Use it or loose it" problem. Thank you very much

ASAPCS May 12, 2004


Can you tel me how can i rename a network drive
eks:h:\\servet01$ to h:\\01s$
thanks marco

Marco May 17, 2004


mDrive = "F:\"
Set oShell = CreateObject("Shell.Application")
oShell.NameSpace(mDrive).Self.Name = "AnyName"

Chizl June 01, 2004


Try this on for size, I use it to standardize drive names across my network:

set renameShell = createObject("shell.application")
mappedDrive = "P:\" 'Your drive letter
renameShell.nameSpace(mappedDrive).self.name = "Drive Name"

Hope this helps...

Will June 01, 2004


 See More Comments  1   2   3   4 

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Related Events WinConnections and Microsoft® Exchange Connections

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement