SideBar    Using Mapped Files for Backups
DOWNLOAD THE CODE:
Download the Code 38952.zip

With this capability, you can share a drive, then map any or all of the folders on that drive. However, you need to be exceptionally judicious about security in such cases. I use this technique only in test lab scenarios that provide a controlled environment (i.e., a discrete LAN on a hub that's unconnected to the rest of the enterprise and on which I either run a firewall or eliminate Internet access). After I share drive C of each computer that's on the LAN, I can remotely access any folder on those drives. For example, to access the LabData folder on the C drive of the TestBox server in my lab, I can type

net use d: \\TestBox\C\LabData

I can then perform any task that involves a remote folder. For example, I use mapped drives to perform backups across the network; for details, see the sidebar "Using Mapped Files for Backups."

Administrators can use the Net Use command within logon batch files to set mapped drives for users so that they can easily access frequently used folders on remote systems. For example, for users who work with the company database, you might have a logon script that contains the following lines:

net use g: \\BigServer\OurDatabase
net use h: \\BigServer\DatabaseFiles

Name the batch file whatever you want (be sure it has a .bat extension), and copy it to the logon script directory on your domain controller (DC). The default location for logon scripts on a Win2K DC is %SystemRoot%\SYSVOL\sysvol\domain name.com\scripts. Win2K automatically shares the scripts subfolder with the share name Netlogon.

Be very careful not to map the drive letter assigned to user home drives. During user logon, Windows maps the home drive before running logon scripts from the scripts subfolder. If your logon script tries to map a drive letter that's already used, the system returns the message The local device name is already in use.

Automatic Disconnection of Mapped Drives
Sometimes, when a user opens My Computer or Windows Explorer, a red X appears on the mapped drive's icon, indicating that the drive isn't available. Windows automatically disconnects mapped drives after a period of inactivity (the default interval is 15 minutes) and displays a red X on the drive's icon. When that happens, clicking the icon or entering the drive letter followed by a colon (:) at the command prompt automatically reconnects the drive. But the red X also appears if the computer that holds the mapped share isn't available for some reason, in which case these steps don't work. Because users can't tell why the red X appears, they often call the Help desk.

You could cut down on those Help desk calls if you could disable the automatic disconnection of mapped drives so that users see a red X only when a remote computer is down. The Autodisconnect registry value controls the automatic disconnect. According to Microsoft, you can disable this function by setting Autodisconnect to -1. However, the registry won't let you enter a minus sign for this value. Some Microsoft support technicians suggest entering

net config server /autodisconnect:-1

at a command prompt. Although this command appears to enter a value of -1 for the Autodisconnect registry value, it actually changes the value to the maximum supported value, which is 4,294,967,295 minutes (more than 8000 years) for Win2K Professional and 65,535 minutes (more than 45 days) for Win2K Server. Both values are large enough to effectively disable the autodisconnect function. However, the Net Config command also changes two other subkey values, and these additional changes (which affect browser announcement schedules) might cause other problems.

Some administrators try changing the Autodisconnect value to 0. However, a 0 value doesn't prevent automatic disconnection of mapped drives. Rather, this value has the effect of disconnecting drives erratically and often quite quickly.

The best approach is to explicitly set Autodisconnect to the maximum supported value. Start a registry editor (e.g., regedit.exe) on the computer that holds the share (not the remote computer that maps the share). Navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters subkey, and double-click the Autodisconnect registry value. If the computer on which the share resides is a Win2K Pro workstation, enter a new decimal value of 4294967295 or a new hexadecimal value of ffffffff. If the computer is a Win2K server, enter a new decimal value of 65535 or a hex value of 0xffff.

Prev. page     1 2 [3] 4     next page



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

This article has been very useful. Thanks.

Eloy

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

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

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

cezanna

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

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

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

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

Marco

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

Chizl

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

Does anyone know how to reverse the net config server /autodisconnect:-1 command? Or further, what the other two values are that are changed? How to get them back to their orginal state? Best regards - the guy with the ridiculous username

Tom,Tom,TomClift

Can an ID password be passed with this command?

Anonymous User

does anyone know to have a service map a drive when it starts

ministak

Article Rating 3 out of 5

test

Anonymous User

Article Rating 5 out of 5

I set up drive mapping on this particular computer running W2k awhile ago. Now it won't retain the mapped drive in "My Computer" for restricted user account. The shortcut for the mapped drive disappears after restarting. Now if I tried to set up a new restricted account and the mapped drive shortcut stays, even after restarting. I suspect the profile on the account I created before is corrupted. I would like to know what to check in this situation. Thanks in advance.

Anonymous User

Article Rating 5 out of 5

See More Comments  1   2   3 
 
 

ADS BY GOOGLE