1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

create a logon script to map a drive

Discussion in 'Legacy Windows' started by goodkat, 2005/02/15.

Thread Status:
Not open for further replies.
  1. 2005/02/15
    goodkat

    goodkat Inactive Thread Starter

    Joined:
    2004/09/17
    Messages:
    48
    Likes Received:
    0
    I have a small problem. I have a computer that I don't know who is going to log onto it - any one of 25 people could log on, because of it's location and function. :cool:

    I need to map a network drive for the program they need to run. I don't want to install everyone's profiles on there, and map a drive by hand. That would take too long. :confused:

    Is there a command that I can use to map a drive, and put it in the startup folder as a batch file, or is there an environment variable that will do it?

    Oh, this is a windows 2000 box, in a Microsoft network environment.

    Thanks,

    Kathie :eek:
     
  2. 2005/02/15
    localhost

    localhost Inactive

    Joined:
    2002/11/27
    Messages:
    90
    Likes Received:
    0
    Try the following:

    Code:
    REM Batch file for mapping network drive
    @echo off
    
    REM This command will map the network drive (domain environment)
    net use x: \\network-path\folder_name /USER:domain\username
    
    REM This command will map network drives (non-domain environment)
    net use y: \\network-path\folder_name /USER:username
     

  3. to hide this advert.

  4. 2005/02/16
    goodkat

    goodkat Inactive Thread Starter

    Joined:
    2004/09/17
    Messages:
    48
    Likes Received:
    0
    Ah, but I don't know the user names.

    I left out the user name and domain part, and it worked.

    Thanks.
     
    Last edited: 2005/02/16
  5. 2005/02/16
    localhost

    localhost Inactive

    Joined:
    2002/11/27
    Messages:
    90
    Likes Received:
    0
    No problem :)

    Glad that it worked for you.
     
  6. 2005/03/03
    mythologyrocks

    mythologyrocks Inactive

    Joined:
    2005/03/03
    Messages:
    1
    Likes Received:
    0
    Create Login script to map network drive

    Hi all,

    I did see the message posted by a friend of mine here asking abt. mapping a network drive when the system boots up..

    Here is what I am trying to do...I am systems admin for a couple of labs in my university...There are abt. 375 users in the class...I want the network drive to be mapped automatically when they login, in any of the lab machines...There are abt. 100 machines in the lab...

    First, how can I do that? I know how to map a network drive manually, but I want them to be mapped automatically as soon as the system is started...

    Lets' say the server name is \\students\<username> for their home space...How shud the logon script look like? Also where shud the file be? in the server or every local machine? If its on a local machine, then I need to do this on every single machine which again is a big headache...

    Any help in this regard is highly appreciated...Bear with me, in case this sounds very amateurish, as I am just a beginner... :)

    Thanx a bunch.
    Regs,
    A beginner, just starting to learn
     
  7. 2005/03/03
    localhost

    localhost Inactive

    Joined:
    2002/11/27
    Messages:
    90
    Likes Received:
    0
    If it is over 300 machines, I suppose all the machines should have joined a Domain. If it is in a domain environment, you can assign roaming profiles for all your users. As such, regardless of which lab computers they use, their profiles will be retrieved from the server when they login.

    You can specify the login script by specifying it in domain policy or for the particular Organizational Unit. Alternatively, you can do it to each individual user account, which is a tedious process and should not be practiced. I can't remember the exact steps since I don't have a server machine at this moment.

    Gd luck!
     
  8. 2005/03/23
    NetDoc

    NetDoc Inactive

    Joined:
    2005/01/09
    Messages:
    215
    Likes Received:
    0
    Logon script:

    net use h: \\servername\sharename\%username%​

    If the sharename is the username then:

    net use h: \\servername\%username%​

    How you implement this will depend on your environment.

    DRD
     
  9. 2005/03/24
    Chris H

    Chris H Inactive

    Joined:
    2002/10/09
    Messages:
    107
    Likes Received:
    0
    This is what I use in our Domain

    net use M: \\computer\directory /USER:mmax\%USERNAME%
     
  10. 2005/03/24
    goodkat

    goodkat Inactive Thread Starter

    Joined:
    2004/09/17
    Messages:
    48
    Likes Received:
    0
    Well, since every user that logs onto the computer is mapped to the same drive exactly, this is what I came up with, and it works. Otherwise you can map a drive for the users in their active directory profile.

    In a file called mapdrive.bat (shortcut in the startup folder):

    net use j: \\server\folder /persistent:yes
     
    Last edited: 2005/03/24
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.