1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Mapped Drives and logon scripts!

Discussion in 'Networking' started by kotik, Sep 19, 2004.

Thread Status:
Not open for further replies.
  1. kotik

    kotik Thread Starter

    Joined:
    Sep 19, 2004
    Messages:
    2
    Clients are Windows 2000 running in a Windows 2000 AD. I run a login script for each user. The logon script uses a little utility ifmember.exe to check for what security groups a user is a member of and will map appropriate drives from the file server accordingly. At the top of the log on script i delete all mapped drives (NET USE * /D /Y)first in case the user has made some manual mappings.

    This all works fine except for when a user has a home drive mapping in their profile. In this case what happens is that the home drive "h" gets mapped first, and then the login script executes inside the "h" drive. The first line in the script as mentioned before deletes all mapped drives INCLUDING the "h" drive from where the script is executing. The rest of the script then ofcourse fails to execute with an "invalid working directory" error.

    I can get around this problem possibly by deleting all drives manually rather then using a wildcard for all in NET USE * /D /Y except h drive. However there are a lot of drives. The whole bloody alphabet is almost in use. I do have "NET USE H: /HOME" right after the delete all line in the login script but that doesn't help.

    Does anyone have any nice solutions in mind? I definitely need to have the home drive in their profile which is always mapped as drive H. Is it possible to change the startup directory so the script doesn't execute from the home directory for users who have a home drive?

    Thanks for all your help in advance. (y)
    Alex
     
  2. kotik

    kotik Thread Starter

    Joined:
    Sep 19, 2004
    Messages:
    2
    solved it by adding c: right to the top of the login script which changes the working directory. I had that initially in there but just prior to the net use * /d /y command and it didn't work. Needs to be at the top of the script.

    ab
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/275920

  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.
    Dismiss Notice