Page 1 of 1 1
Topic Options
#31680 - 2002-10-31 10:48 PM Not mapping drive!
KatzS Offline
Fresh Scripter

Registered: 2002-03-26
Posts: 6
I have a simple script below. The user belongs to the RADONC-FAC group and the RADONC group. The user gets the first two drive mappings under RADONC-FAC but never gets the RADONC J: drive. The same thing happens with other users of different groups. Any reason why this would not work? I'm new to Kixtart and not very sofisticated when it comes to scripting in it. Any help would be great.

if ingroup("radonc-fac")
use h:"\\unmcrad\radusers"
use i:"\\unmcrad\radonc-fac"
endif

if ingroup("radonc-staff")
use h:"\\unmcrad\radusers"
use i:"\\unmcrad\radonc-staff"
endif

if ingroup("radonc-rsrch")
use h:"\\unmcrad\radusers"
use i:"\\unmcrad\radonc-rsrch"
endif

if ingroup("radonc")
use j:"\\unmcrad\radonc-share"
endif

Top
#31681 - 2002-10-31 11:05 PM Re: Not mapping drive!
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
There are no spaces between driveletter and share. Try this:
code:
if ingroup("radonc-fac")
use h: "\\unmcrad\radusers"
use i: "\\unmcrad\radonc-fac"
endif

if ingroup("radonc-staff")
use h: "\\unmcrad\radusers"
use i: "\\unmcrad\radonc-staff"
endif

if ingroup("radonc-rsrch")
use h: "\\unmcrad\radusers"
use i: "\\unmcrad\radonc-rsrch"
endif

if ingroup("radonc")
use j: "\\unmcrad\radonc-share"
endif

And please post code between [CODE] tags.
_________________________
There are two types of vessels, submarines and targets.

Top
#31682 - 2002-10-31 11:06 PM Re: Not mapping drive!
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
What OS are you running, which KiX version???

Please give us more info so we can help you!!
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#31683 - 2002-10-31 11:12 PM Re: Not mapping drive!
KatzS Offline
Fresh Scripter

Registered: 2002-03-26
Posts: 6
I'm using version 4.02 Kixtart and Windows 2000 for client and server OS. Putting a space in between the drive letter and share doesn't help. Thanks.
Top
#31684 - 2002-10-31 11:16 PM Re: Not mapping drive!
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Is this a new group? Have you read the manual about group token cache?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#31685 - 2002-10-31 11:33 PM Re: Not mapping drive!
KatzS Offline
Fresh Scripter

Registered: 2002-03-26
Posts: 6
No it's not a new group. I ran it for the heck of it anyway and no change. Am I supposed to be able to have a user a member of two groups and expect mappings for each with the script I've listed above? It seems like it is not running through the entire script.
Top
#31686 - 2002-10-31 11:34 PM Re: Not mapping drive!
KatzS Offline
Fresh Scripter

Registered: 2002-03-26
Posts: 6
No it's not a new group. I ran it for the heck of it anyway and no change. Am I supposed to be able to have a user a member of two groups and expect mappings for each with the script I've listed above? It seems like it is not running through the entire script.
Top
#31687 - 2002-11-01 12:54 AM Re: Not mapping drive!
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
Have a look at these functions for drive mapping ideas / solutions...

YAMD()

MAPDRIVE()

MAPDRIVES()
_________________________
We all live in a Yellow Subroutine...

Top
#31688 - 2002-11-01 03:15 AM Re: Not mapping drive!
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
KatZ,
What you need to do is a bit of testing to see where exactly it is failing. I don't know if you copyied and pasted that snippet of code directly or if you retyped it.

Throw together a small test script and include some verbose comments and/or run it with debug on so you can see where it is failing. Maybe the script never gets to the last IF or maybe the InGroup() is failing or possibly the USE is the problem.

code:
Break on
if ingroup("radonc")
"InGroup RADONC passed" ?
use "j:" "\\unmcrad\radonc-share"
@error+' ['+@SError+']' ?
endif

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#31689 - 2002-11-01 10:46 AM Re: Not mapping drive!
BrianK Offline
Getting the hang of it

Registered: 2002-10-02
Posts: 90
Loc: Amsterdam, The Netherlands
Hi KatzS,

is drive J: not mapped at all, or is it mapped to some other share?
Also it might be helpfull to first delete the existing mappings, before remapping them, like so:

code:
 
if ingroup("radonc-fac")
use h: /d /persistent
use i: /d /persistent
use h: "\\unmcrad\radusers"
use i: "\\unmcrad\radonc-fac"
endif
if ingroup("radonc-staff")
use h: /d /persistent
use i: /d /persistent
use h: "\\unmcrad\radusers"
use i: "\\unmcrad\radonc-staff"
endif
if ingroup("radonc-rsrch")
use h: /d /persistent
use i: /d /persistent
use h: "\\unmcrad\radusers"
use i: "\\unmcrad\radonc-rsrch"
endif
if ingroup("radonc")
use j: /d /persistent
use j: "\\unmcrad\radonc-share"
endif

Good luck.

Brian
_________________________
Rodney Dangerfield: “My mother didn't breast-feed me. She said she liked me as a friend.”

Top
#31690 - 2002-11-01 02:51 PM Re: Not mapping drive!
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And sprinkle
code:
? 'Error Code '+@ERROR+' - '+@SERROR

throughout your code to see which statements complete successfully.
_________________________
There are two types of vessels, submarines and targets.

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 476 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.062 seconds in which 0.028 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