Re: Login script and drive mappings
- From: "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Oct 2008 22:14:13 -0500
"hrd2fnd" <hrd2fnd.3hpgjd@xxxxxxxxxxxxx> wrote in message
news:hrd2fnd.3hpgjd@xxxxxxxxxxxxxxxx
Having no experiance with scripting I thought I would ask for some
help.
I have this login script that maps 2 groups to the same drive letter
depending on which group they are in. The problem is the users are in
both groups and none of the drive mappings will map.
I'm assuming that it is because of being in both groups that want the
same drive letter. Can anyone give me some advice?
Here is a pasting of the script.
Thank you in advance
Hrd
Case "DEPT-xxxx_xxxx"
WSHNetwork.RemoveNetworkDrive "W:"
wscript.sleep 300
WSHNetwork.MapNetworkDrive "W:", "\\server1\xxx\xxx",True
Case "DEPT-yyyy_GRP"
WSHNetwork.RemoveNetworkDrive "W:"
wscript.sleep 300
WSHNetwork.MapNetworkDrive "W:", "\\server1\xxx\yyyy",True
You have to either use different drive letters, or code so that one group
has preference over the other. However, assuming you have pasted code from a
"Select Case" construction, that is what should happen. Only the first
matching "Case" clause executes. If you run the "Select Case" statement
repeatedly for each group the user is a member, that is a problem. You need
to exit the loop after the first group match is found, perhaps with an "Exit
For" statement.
The most likely problem is that the group name does not match exactly with
any of your Case clauses because of case (upper and lower case characters).
I would suggest using the LCase function with the group name, then using
only lower case group names, like "dept-xxxx_xxxx".
Otherwise, we may need to see more of your script (especially how you get
group memberships). Also, there is no need for the Sleep statements.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
.
- Follow-Ups:
- Re: Login script and drive mappings
- From: hrd2fnd
- Re: Login script and drive mappings
- References:
- Login script and drive mappings
- From: hrd2fnd
- Login script and drive mappings
- Prev by Date: Could not detect all memory installed
- Next by Date: RE: Major Folder Redirection Issues
- Previous by thread: Login script and drive mappings
- Next by thread: Re: Login script and drive mappings
- Index(es):
Relevant Pages
|