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.

I want a SCRIPT to map my network drives

Discussion in 'Legacy Windows' started by Greg Golden, 2004/09/12.

Thread Status:
Not open for further replies.
  1. 2004/09/12
    Greg Golden

    Greg Golden Well-Known Member Thread Starter

    Joined:
    2003/08/22
    Messages:
    199
    Likes Received:
    1
    OK, here is how I do it now: I manage about 8 machines in a small business. All but one run Win2Kpro. One runs WinXPpro. The server has Windows2000Server. Each time I set up or rebuild a machine, I manually map five network drives using 'My Computer." For each user that needs access to a machine, I must manually map the network drives again while that user is logged on.
    What I envision is this: I should be able to map the network drives from a command line script, using the NET USE command. If the mapped drive definitions could be applied to all users on the workstation, it would be a cinch to just install that script on each machine, rather than set up the mapped drives one-by-one, for every user on every machine, as I do now.
    1. How could I tell it to apply the mapped drives to all users?
    2. Where would I install the script? In Autoexec.bat? I imagine it must wait for the NIC card driver (etc) to load, before it would be useful.
    3. Should I be looking for a solution on the server rather than the workstations? Maybe I am wasting my time? Thanks for any ideas, GG.
     
  2. 2004/09/13
    Scott Smith

    Scott Smith Inactive Alumni

    Joined:
    2002/01/12
    Messages:
    1,950
    Likes Received:
    4
    Domain? or, Workgroup?
     

  3. to hide this advert.

  4. 2004/09/13
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    The proper way is via a login script. You can specify the script to use in the users details on the server (assuming you have a server).

    The bodgers way is to add the batch file to the start up folder.

    My favourite is to put the batch file somewhere easy to find on the network and then run it once. Once the mappings are in place, XP and Win2000 tend to remember them. I am also biased towards this approach as I run a Novell network with Win9x PC as well as 2000 and XP. Using an NT/2000/2003 log on script as well as the Netware log on script can cause additional headaches.

    The syntax for the NET USE command is:

    NET USE <Drive Letter>: \\<server name>\<share>

    For example:

    NET USE Z: \\myserver\myfolder

    A variant of that is:

    NET USE <Drive Letter>: /DELETE

    That will remove a mapping. Even better you can use:

    IF EXIST Z:\. NET USE Z: /DELETE

    That will check if there is something to delete before deleting.
     
  5. 2004/09/13
    Greg Golden

    Greg Golden Well-Known Member Thread Starter

    Joined:
    2003/08/22
    Messages:
    199
    Likes Received:
    1
    To Ssmith10pn: We use a domain.
    To Reggie: I will try both methods. Just give me some time to experiment during off-hours when I can do less damage! Thanks for your ideas. GG.
     
  6. 2004/09/13
    Newt

    Newt Inactive

    Joined:
    2002/01/07
    Messages:
    10,974
    Likes Received:
    2
    Since you have a domain, go with the logon script. You can do this and lots more good things that way and you only need to make changes one place if you later want to do things differently.

    Then there is the netadmin biggie - done via logon script and it is pretty well user-proof. :D
     
    Newt,
    #5
  7. 2004/09/14
    Greg Golden

    Greg Golden Well-Known Member Thread Starter

    Joined:
    2003/08/22
    Messages:
    199
    Likes Received:
    1
    Newt-- sounds like a good direction to proceed. Thanks./GG
     
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.