?
Solved

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

Posted on 2006-03-20
7
Medium Priority
?
521 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!
0
Comment
Question by:esckeyrwm
  • 3
  • 3
7 Comments
 
LVL 33

Expert Comment

by:NJComputerNetworks
ID: 16237591
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
 
LVL 23

Expert Comment

by:TheCleaner
ID: 16237852
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
 

Author Comment

by:esckeyrwm
ID: 16238502
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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 23

Expert Comment

by:TheCleaner
ID: 16238997
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
 
LVL 33

Expert Comment

by:NJComputerNetworks
ID: 16239507
"anti-theory..."   lol
0
 
LVL 33

Accepted Solution

by:
NJComputerNetworks earned 750 total points
ID: 16239541
"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
 
LVL 23

Expert Comment

by:TheCleaner
ID: 16239756
:)  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

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question