Page 1 of 1 1
Topic Options
#68973 - 2002-08-09 06:00 PM Duplicate mapped drives
Sami Offline
Fresh Scripter

Registered: 2002-08-09
Posts: 5
Loc: London
Hi All!

I am using kix mainly for drive mapping and printers assignments but somehow some of my users get the drives duplicated more than once. I am using the following script:
;
; ~ Container login script for Sami ~
;
; 25/06/2002
;
;SETCONSOLE("hide")
CLS

USE * /DELETE

use f: "\\ServerX\@userid$" ; mapping to users personal drive

; Departmental G Drive mappings

IF InGroup("Accounts") RUN "net use g: \\ServerX\accounts"
ENDIF

IF InGroup("Acquisitions") RUN "net use * \\ServerX\acquisitions"
ENDIF

IF InGroup("Buildings") RUN "net use * \\ServerX\buildings"
ENDIF

IF InGroup("Construction") RUN "net use * \\ServerX\construction"
ENDIF

IF InGroup("HR") RUN "net use * \\ServerX\HR"
ENDIF

IF InGroup("IT") RUN "net use * \\ServerX\IT"
ENDIF

IF InGroup("Marketing") RUN "net use * \\ServerX\Marketing"
ENDIF

IF InGroup("Operations") RUN "net use * \\ServerX\operations"
ENDIF

IF InGroup("Managers") RUN "net use * \\ServerX\SnrMgt"
ENDIF

IF InGroup("Training") RUN "net use * \\ServerX\Training"
ENDIF

; Public access I Drive mappings

USE i: "\\ServerX\public"

; Additional Drive mappings for Accounts Dept

IF InGroup("Accounts") RUN "net use t: \\Serversql\Server"
ENDIF

; Group Specific Print Port Captures

IF InGroup("Accounts4050") RUN "net use lpt2 \\ServerX\accounts4050"
ENDIF

IF InGroup("Accounts4000") RUN "net use lpt2 \\ServerX\accounts4000"
ENDIF

IF InGroup("AccountsHP4000") RUN "net use lpt2 \\ServerX\HP4000"
ENDIF

I would appreciate all the help

Regards,

Sami Benafia

Top
#68974 - 2002-08-09 06:02 PM Re: Duplicate mapped drives
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
first I suggest you change the use lines to be kix.
what I means is:
IF InGroup("Accounts") RUN "net use g: \\ServerX\accounts"
ENDIF

is the same as:
IF InGroup("Accounts") use g: "\\ServerX\accounts"
ENDIF
_________________________
!

download KiXnet

Top
#68975 - 2002-08-09 06:17 PM Re: Duplicate mapped drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Is it possible that they have manual drive mappings?
If you do a
code:
use * /delete

you will remove all drive mapings.
_________________________
There are two types of vessels, submarines and targets.

Top
#68976 - 2002-08-09 06:19 PM Re: Duplicate mapped drives
Sami Offline
Fresh Scripter

Registered: 2002-08-09
Posts: 5
Loc: London
That doesn't seem to resolve the problem. All the drives are being duplicated
Top
#68977 - 2002-08-09 06:21 PM Re: Duplicate mapped drives
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sami, if you get rid of the net use calls I'll be happy.

if all gets there twice, I have to ask how you call the script itself?
_________________________
!

download KiXnet

Top
#68978 - 2002-08-09 06:45 PM Re: Duplicate mapped drives
Sami Offline
Fresh Scripter

Registered: 2002-08-09
Posts: 5
Loc: London
I am going to change the net use and replace as you have suggested and see.
The script is run from the network by using a batch file to look for the kix32.exe the line in the batch file are: \\serverY\NETLOGON\KixScript\Kix32.exe \\ServerY\NETLOGON\KixScript\Sami.kix.
------------------------------------------

Top
#68979 - 2002-08-09 10:39 PM Re: Duplicate mapped drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Put a DEBUG ON into the first line of code and step through the code line by line. The script somehow must be called twice if all the drive mappings (I guess without the G: and T: drives) ad double.
_________________________
There are two types of vessels, submarines and targets.

Top
#68980 - 2002-08-09 11:36 PM Re: Duplicate mapped drives
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well...

what I think is that there is possibilities.
1) your batch call's it twice
2) your batch call's it twice
3) ...

if you could post your batch.
_________________________
!

download KiXnet

Top
#68981 - 2002-08-15 03:46 PM Re: Duplicate mapped drives
Sami Offline
Fresh Scripter

Registered: 2002-08-09
Posts: 5
Loc: London
Hi all
I have change the script not to have net use but the persistant problem is in the script I use * to assign drive letter to the drives, but it doesn't do it. and I would like to know if there is a command not to delete the mapped drive done by the user on the local PC?

Many thanks in advance

Sami

Top
#68982 - 2002-08-15 04:15 PM Re: Duplicate mapped drives
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Please define exactly what you mean by duplicate drives.

I can only assume that you mean that sequential drive letters are getting the UNC (\\server\share) connection. Please list all the drive letters you see and what they get mapped to.

On what OS does this happen?

Have you copied a shortcut to these computers for the user to startup a common application?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#68983 - 2002-08-15 05:12 PM Re: Duplicate mapped drives
Sami Offline
Fresh Scripter

Registered: 2002-08-09
Posts: 5
Loc: London
What I mean is the line use */DELETE did not function at the begining so everytime the user logs on they get the same drive again and again with a different drive letter. eventually it stops as it runs out of letters. and this problem is happening mainly on Win 2000.
No I don't have any shortcuts to these computers to start any apps but I have manually mapped certain users to certain drives and as the delete command is working now they loose all the previously mapped drives and I can't get the following to work

Code
IF InGroup("Accounts" use * \\ServerX\Accounts
ENDIF

I hope I am making sense of all this [Confused]

Thanks

Sami

Top
#68984 - 2002-08-15 06:53 PM Re: Duplicate mapped drives
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sami, I think you would be better of assigning the driveletters.
this way you don't need to delete users own mappings.

doing explicit deletion and use on one driveletter is safest and easier for user too.
_________________________
!

download KiXnet

Top
#68985 - 2002-08-15 07:51 PM Re: Duplicate mapped drives
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Sami, you should take total control of the user session during logon and have assigned drive letters to specific locations. See this post for an idea how you can more control the mapping process.

Drive mapping checks
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#68986 - 2002-08-20 05:53 PM Re: Duplicate mapped drives
Walter349 Offline
Lurker

Registered: 2002-08-04
Posts: 2
This may seem a little simplistic but have you checked that the users are not members of multiple groups.
Top
#68987 - 2002-10-18 01:10 PM Re: Duplicate mapped drives
Dave Stemp Offline
Lurker

Registered: 2002-10-17
Posts: 1
Loc: John Deere Welland
Is this by chance on Win2000 Active Directory? I am working through the same issue and have tracked it down (as told by my AD guru) to our carrying SID history from our old NT4 domain. Have not yet tackled the script rewrite yet, still examining the possibilities.
Top
Page 1 of 1 1


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

Who's Online
0 registered and 384 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.108 seconds in which 0.066 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