Page 1 of 1 1
Topic Options
#27321 - 2002-08-19 02:09 AM Newbie in trouble
Clayton Offline
Fresh Scripter

Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
Hello everyone. I'm a bigtime newbie to Kixtart. I've used it at a previous job but never had to program it. Now I'm in a situation where I need a script yesterday. I'm reading through everything but I'm still stuck. I'm in such a rush to get this done I'm not getting anywhere.
Here's what I'm needing to do.
I have a mixed NT/2000 Domain with mixed 95/98se/me/2000/xp clients.
I'm needing to set drive mappings for specific groups and user personal drives. What's the best way to setup Kix? Can anyone help me get started? I'm going to continue to read through the forum here. Thanks for any help.

[ 19. August 2002, 02:24: Message edited by: Clayton ]

Top
#27322 - 2002-08-19 02:35 AM Re: Newbie in trouble
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
At least it's an easy one, since you need it yesrerday.

For drive mappings you'd use the USE command. Syntax would be
code:
use x: '\\server\share'

For personal home directories in a multi-OS situation you'd do the following. Create hidden shares for each user directory, e.g. you have d:\users\user1, d:\users\user2 and you create a hidden share user1$, user2$. Then you have a Kixtart script like
code:
use p: '\\server\'+@USERID+'$$' /persistent

which will map a userid (e.g. user1) to the hidden share user1$ and you're all set.

For group dependent mappings, you'd code like this:
code:
if ingroup('group a')
use x: '\\server\share1'
endif

; next line works only in KiXtart 4.10 and newer version
if ingroup('group a','group b')
use y: ''\\server\share1'
endif

I would highly ecommend to read the KiXtart manual since it contains a lot of examples for each command/function.
_________________________
There are two types of vessels, submarines and targets.

Top
#27323 - 2002-08-19 03:09 AM Re: Newbie in trouble
Clayton Offline
Fresh Scripter

Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
Thanks! You saved me from huge headaches tomorrow morning!!!
Top
#27324 - 2002-08-19 01:41 PM Re: Newbie in trouble
Bobby Chan Offline
Fresh Scripter

Registered: 2002-02-07
Posts: 28
Loc: Montreal, Quebec, Canada
Just a note... From my experience, it is safer to unmap (use x: /delete) before you map, else, the mapping will fail.
Top
#27325 - 2002-08-19 01:46 PM Re: Newbie in trouble
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
bobby, yes. good note.
anyway, it fails only on persistent mappings.
_________________________
!

download KiXnet

Top
#27326 - 2002-08-19 08:23 PM Re: Newbie in trouble
Clayton Offline
Fresh Scripter

Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
Thanks everyone. I knew it would be simple just had to do this in a rush. I'm wanting to learn more about Kixtart so I'll be here more often.
Here's what I have right now if you guys think I should do anything different please let me know.

If InGroup("ADM") Use h: "\\tpaprime01\ACCT" EndIf
If InGroup("CORP") Use h: "\\tpaprime01\CORP" EndIf
If InGroup("MEDMAL") Use h: "\\tpaprime01\MAL" EndIf
If InGroup("REALAND") Use h: "\\tpaprime01\REALAND" EndIf
If InGroup("ENV") Use h: "\\tpaprime01\ENV" EndIf
If InGroup("CORP") Use h: "\\tpaprime01\CORP" EndIf
If InGroup("FLOATER") Use h: "\\tpaprime01\DATA" EndIf
If InGroup("INS") Use h: "\\tpaprime01\INS" EndIf
If InGroup("LABOR") Use h: "\\tpaprime01\LABOR" EndIf

Use U: '\\tpaprime01\'+@USERID+'$$' /persistent
Use G: \\tpaprime01\vol1\data
Use J: \\tpaprime01\vol1
Use S: \\tpaprime01\shared
Use W: \\tpaprime01\word
Use X: \\tpaprime02\apps

Top
#27327 - 2002-08-19 08:28 PM Re: Newbie in trouble
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
In this case you could use SELECT-CASE-ENDSELECT since the IFs are all mutually exclusive.
_________________________
There are two types of vessels, submarines and targets.

Top
#27328 - 2002-08-19 08:33 PM Re: Newbie in trouble
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Clayton, in your case based on your example code a SELECT...ENDSELECT would be more efficient than all the IF statments.

code:
Select
Case InGroup("ADM") $share = "\\tpaprime01\ACCT"
Case InGroup("CORP") $share = "\\tpaprime01\CORP"
Case InGroup("MEDMAL") $share = "\\tpaprime01\MAL"
Case InGroup("REALAND") $share = "\\tpaprime01\REALAND"
Case InGroup("ENV") $share = "\\tpaprime01\ENV"
Case InGroup("CORP") $share = "\\tpaprime01\CORP"
Case InGroup("FLOATER") $share = "\\tpaprime01\DATA"
Case InGroup("INS") $share = "\\tpaprime01\INS"
Case InGroup("LABOR") $share = "\\tpaprime01\LABOR"
EndSelect
If $share <>""
Use H: $share
Endif
Use U: '\\tpaprime01\'+@USERID+'$$' /persistent
Use G: "\\tpaprime01\vol1\data"
Use J: "\\tpaprime01\vol1"
Use S: "\\tpaprime01\shared"
Use W: "\\tpaprime01\word"
Use X: "\\tpaprime02\apps"

Also its better to enclose the path potion of the USE statement in quotes.

[ 19. August 2002, 20:35: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#27329 - 2002-08-19 08:42 PM Re: Newbie in trouble
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
This 'Use G: "\\tpaprime01\vol1\data"' will not work under Windows 9x!

Please read the KiXtart Manual Appendix A and read the posts containing 'map root' on this BBS for reasons why deep mapping does not work under Windows 9x.
_________________________
There are two types of vessels, submarines and targets.

Top
#27330 - 2002-08-20 02:49 PM Re: Newbie in trouble
Clayton Offline
Fresh Scripter

Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
Yes Jens. I knew that but didn't pay attention to it. Thanks for pointing that out. I have the Kix manual printed out and sitting right here in front of me. I plan on reading through it.
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 1077 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

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