none
How can I assign a drive letter to a folder for all users in my domain?

    Question

  • I am the Administrator of a Windows Server 2003 domain. I currently have a folder being file shared on the domain. However, users must go to Network > Entire Network > Microsoft Windows Network > (name of domain) > (name of server computer) to see the folder. I know how to assign a drive letter to a shared folder so that I can easily access the shared files from "My Computer," but how do I make it so this shared folder is assigned a drive letter for all computers and users of my domain? Any help is much appreciated.

    Wednesday, July 01, 2009 4:07 PM

Answers

All replies

  • Hadye,

    You will want to use a log in script to accomplish this.  Something easy a vb script is good. 
    Set objNetwork = CreateObject("WScript.Network") 
    objNetwork.MapNetworkDrive "N:" , "\\server\share"
    The above code will map the folder share on the server named server with the drive letter of N.  Generally you want to use higher letters (if you plug anything into the computer, you want to leave the drive letters open) so I would suggest starting with N or so.

    You will want to place this under the user settings in AD, under the profile tab. You will see where you can specify the log in script. 

    Lastly, you want to place the script on the DC, under the windows\sysvol\(domain name)\scripts folder.  this is where the DC looks by default to run the login script.

    Good luck.

    Scotty
    Wednesday, July 01, 2009 6:01 PM
  • User settings in Active Directory? Where is that?
    Wednesday, July 01, 2009 7:56 PM
  • On the DC, under Active Directery Users and Computers, if you right click on the individule user and select properties, you will get the User Settings (properties) up. This will have a tab labeled Profile.  You will see where the login script is available to fill in.  Just simply put the name of the login script you placed in the sysvol folder (path above).  I would recommend testing this on a single account first, to make sure it maps correctly and every time.  Once you have tested it, you can start implementing it.  If you place the login script in the properties while a user is logged in, simply have them log out and back in to have the drive mapped correctly.

    Good luck. ^_^

    Scotty
    Wednesday, July 01, 2009 8:12 PM
  • So I place this script in the shared "sysvol" folder, then type the name of the file in the "logon script" box? Do I need to write the script in Microsoft VBscript?
    Wednesday, July 01, 2009 8:54 PM
  • Hello Hadye,

    Ifyou are not good with vbscript you can go here and download this free logon script generator. It will auto assign drive letters as you desire. I use it and it is great tool for drive mapping and letter assignment
    http://www.jdhitsolutions.com/logonscriptgen/index.htm
    Isaac Oben MCITP:EA, MCSE
    Wednesday, July 01, 2009 9:14 PM
  • Hello Hadye,

    Ifyou are not good with vbscript you can go here and download this free logon script generator. It will auto assign drive letters as you desire. I use it and it is great tool for drive mapping and letter assignment
    http://www.jdhitsolutions.com/logonscriptgen/index.htm
    Isaac Oben MCITP:EA, MCSE

    Thank you, I will try that way.
    Thursday, July 02, 2009 1:25 AM
  • You could just use a bat or cmd script.  Mine goes something like this:
    :Test
    timeout 20
    sc query LanmanWorkstation|find "RUNNING"||sc start LanmanWorkstation
    net use H: || GoTo Map
    dir H:\testfile && GoTo :End || net use h: /delete /yes
    
    :Map
    net use H: \\server\share || GoTo :End
    dir H:\testfile  || GoTo :Test
    

    Thursday, July 02, 2009 1:43 AM
  • Hi,

     

    If there is a Windows Vista machine in the domain, you can also use Group Policy: Drive Maps preference extension to create dynamic drive mappings to network shares.

     

    Drive Maps Extension

    http://technet.microsoft.com/en-us/library/cc731729.aspx

     

    For more information about Group Policy preference, refer to:

     

    Group Policy Preferences Frequently Asked Questions (FAQ)

    http://technet.microsoft.com/en-us/windowsserver/grouppolicy/cc817590.aspx

     

    Information about new Group Policy preferences in Windows Server 2008

    http://support.microsoft.com/kb/943729

     

    Thanks.

    Friday, July 03, 2009 6:11 AM
    Moderator