We help IT Professionals succeed at work.

How to map a users home directory and remove unwanted drive mappings.

esckeyrwm
esckeyrwm asked
on
Medium Priority
559 Views
Last Modified: 2008-01-09
I'm having some problems mapping a user's Home Folder (via the profile tab under user properties), and also running a login script which deletes unwanted drive mappings and maps new drives.  I need to run a login script to remove old drive mappings, but I'd like to be able to specify the users Home Folder under the profile tab.

Our login script contains (net use * /d /y) which we want to disconnect all current drives.  Then the script begins reconnecting several mapped drives per user.  The script appears to work well, however when we use it in conjunction with specifing a Home Folder (user profile), the home folder will not map.

Alternatively, if we choose to omit the login script, the Home Folder mapping works perfectly.

Is there a way to use the two together?  We would like to know how or what sequence we need to use in order to map the Home Folder, and then delete current drives and remap new ones.

Thanks!
Comment
Watch Question

typically, you wouldn't delete all workstation mappings as users may require some locally mapped drives...  Maybe do something like this:

net use f: /d /y
net use g: /d /y

net use i: /d /y
net use j: /d /y
net use k: /d /y
net use l: /d /y
net use m: /d /y
net use n: /d /y


In this example, I am assuming that you are using H: drive letter in your profile settings.  Notice H: was not targeted for deletion.
Just like NJ said...

I believe the Home Folder mapping takes place BEFORE the login script runs, so you are essentially deleting it with your current script.

so do like NJ said, then at the end of that script map back the drives that are needed...

Author

Commented:
Well, the problem is that a large number of users who have mapped drives and we don't know what all of the drive mappings are (and they are not consistant between each other).  So if it is true that the Home Folder mapping takes place before the login script runs, how can we switch it so that the Home Folder maps AFTER the login script?
I see...

I *think* you can do it if you put your login script that kills all drive mappings in the "computer configuration" startup login script.

I honestly don't know if that will work or not, but it's worth a shot.  My theory is that it will remove any existing drive mappings on the computer before the user authenticates to the domain.  However, my anti-theory is that the computer login script won't matter because drive mappings are user based.

heh...worth a shot I guess.  Throw it up in a test world and see what happens.
"anti-theory..."   lol
"So if it is true that the Home Folder mapping takes place before the login script runs, how can we switch it so that the Home Folder maps AFTER the login script?"  You can't....


In your situation, you can not use the

net use * /d /y

Do all of your users get connected to the home folder using the same network drive?  Like H:?  If so, do this in your logon script:

net use f: /d /y
net use g: /d /y

net use i: /d /y
net use j: /d /y
net use k: /d /y
net use l: /d /y
net use m: /d /y
net use n: /d /y
net use o: /d /y
net use p: /d /y
net use q: /d /y
net use r: /d /y
net use s: /d /y
net use t: /d /y
net use u: /d /y
net use v: /d /y
net use w: /d /y
net use x: /d /y
net use y: /d /y
net use z: /d /y

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
:)  like that word huh?

NJ, what he's saying is that some people have already mapped H: to something else persistently...so the user profile doesn't map the drive...
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.