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

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!
esckeyrwmAsked:
Who is Participating?
 
NJComputerNetworksCommented:
"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
0
 
NJComputerNetworksCommented:
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.
0
 
TheCleanerCommented:
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...
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
esckeyrwmAuthor 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?
0
 
TheCleanerCommented:
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.
0
 
NJComputerNetworksCommented:
"anti-theory..."   lol
0
 
TheCleanerCommented:
:)  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...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.