Page 1 of 1 1
Topic Options
#144648 - 2005-08-02 10:51 PM Help with drive mapping in logon script
cmuncy Offline
Lurker

Registered: 2005-07-15
Posts: 2
Have a Windows 2003 server domain using kix for logon scripts to map drives (kix script implemented in group policy for users), want to remove all drive mappings (including persistent) that the users may have created. Have user's home directory setup in the profile tab of the user mapped to U:\. Using the kix code "USE * /DELETE /PERSISTENT", which works except that it also unmaps the U:\ home directory for the user. Is there any easy way to tell kix to unmap everything except U:\, or how can I map the U:\ drive in kix. The users home server has the share \\SERVERNAME\Users and I actually map to \\SERVERNAME\Users\Houston\%USERNAME% on the profile tab. I can't get kix to map all the way down to this level. Any help?
Top
#144649 - 2005-08-02 11:00 PM Re: Help with drive mapping in logon script
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Use u: "\\SERVERNAME\Users\Houston\"@USERID

Edited by Witto (2005-08-02 11:02 PM)

Top
#144650 - 2005-08-02 11:24 PM Re: Help with drive mapping in logon script
cmuncy Offline
Lurker

Registered: 2005-07-15
Posts: 2
OK, that works except that I wasen't clear enough on my original post. The user home folder in the profile tab is \\SERVERNAME\Users\Houston\%USERNAME% but "Houston" could be another name (i.e. users in "Dallas"). I'm trying to use a single kix script for all users. If I use your suggestion, it won't work for non Houston users. Can I get the environment varible "HOMESHARE" into kix so I could just map U:\ to that?
Top
#144651 - 2005-08-03 12:24 AM Re: Help with drive mapping in logon script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why do you want to delete ALL drive mappings including persistent mapping the users may have created? Why not just delete those drives you intend to map in the script? That way the homedrive mapped in the users profile will be spared the axe.

Otherwise, don't you segregate the users by site and could you not use the @Site macro or the InContainer UDF to determine their location?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#144652 - 2005-08-03 12:49 AM Re: Help with drive mapping in logon script
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
Unless you are experiencing problems with users mapping drives, I would take the advice Les provided.

A simple way to map drives per AD Global Group:
Code:
 if ingroup ("INFOSYSTEMS")	
use G: /d ; Deletes any existing mappings to G:
use G: "\\isserver\isg$"

use H: /d ; Deletes any existing mappings to H:
use H: @HOMESHR + \ + @USERID ; connect to user's home share

endif

_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
#144653 - 2005-08-03 01:05 AM Re: Help with drive mapping in logon script
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Should always add the DOMAIN or SERVER as part of the InGroup lookup to speed it up.

I see a failure here
use H: @HOMESHR + \ + @USERID ;

the + \ + needs quotes + '\' +
 

Top
#144654 - 2005-08-03 01:37 AM Re: Help with drive mapping in logon script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I would also always include the /Persistent switch just to be on the safe side.

As for homeshare, IMHO you should either assign it in the profile or map it in the script, but never both.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#144655 - 2005-08-03 01:41 AM Re: Help with drive mapping in logon script
StarwarsKid Offline
Seasoned Scripter
*****

Registered: 2005-06-15
Posts: 506
Loc: Oregon, USA
Thanks for the tips.

Interesting, my user drive example code has been working for 3 years now, not that it doesn't need updating/correcting.

Example: Would you use, IF INGROUP(domain.local\infosystems)
_________________________
let the wise listen and add to their learning,
and let the discerning get guidance- Proverbs 1:5

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 774 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.058 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org