| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Page Last Updated: 21/02/2010
The most frequent use for login scripts is to connect all users to a certain network share, using the same drive letter. This ensures consistency across the network and can make support and documenting procedures much easier. For example, if you wanted to connect all users to a share on "Server1" called "Source" using the letter "S", then you would enter the following:
You can have as many of these as you like as long as the drive letter is available. For this reason it is usual to use letters high up in the alphabet to avoid any machines with multiple drives, plus CD-ROM drives and other devices that assign a letter. Using Persistent Drive Mapping Settings When you use the "net use" command, you have the option of making it persistent - i.e. reconnects after a reboot or logout. This is the same as the "Reconnect at Logon" box that you get when use "Map Network Drive" in Windows Explorer. There are two ways of adjusting these settings. If you want the setting to apply to all drives mapped in the login script, then place the following command before any others (note the lack of space between the "persistent", the ":" and the "yes/no")
If you want to set it on a drive by drive case, then use the following commands:
By changing the location of first variation of the command, some drives could be persistent and others not, without having to set it for each drive. As an alternative, you could also disconnect each drive first, then run the connect commands. Disconnecting Drives However if you are introducing a login script, you should disconnect any existing network drive mappings first, so that your script can work. This is easily achieved, just put the following command BEFORE the connecting one indicated above:
This disconnects any drive mapping created on the letter "S". It is a good idea to leave these lines in even after introduction. Then if any users disconnect a network drive and create their own (persistent) one, it will overwritten by the login script settings. They will soon get tired of having to reconnect at each login. About this site This information originally started life as a page on amset.info, our community assistance site. However that site is targeted at Microsoft Exchange server, as Sembee Ltd. is a Microsoft Exchange consultancy. Therefore it was moved to its own domain in early 2010. Traffic from amset.info is directed here. Other sites that are owned and operated by Sembee Ltd include kbsearch.info, certificatesforexchange.com, dosprompt.info, office-recovery.info, wuauclt.info, blog.sembee.co.uk, exbpa.com and amset.info.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||