Page 1 of 1 1
Topic Options
#73976 - 2003-03-11 09:24 PM Group Mapping issues
Mabraham-ca Offline
Fresh Scripter

Registered: 2003-02-17
Posts: 30
Loc: Toronto
I am trying to map the shared folders according to the groups- The clients mostly windows 95/98 and some NT/W2K. I have tried following script but it never works - all Kix files are in the netlogon directory of the W2K server as well in the system directories of the clients.
Is it any issues using INGGROUP in Windows 95/98 world or best to use IFMEMBER - please advice.

$text = "Connecting network drives"
GOSUB header

IF INGROUP ("sales") = 1
$t = "Connecting drive I:" GOSUB text
USE I: /DELETE
USE I: "\\myt-1001\sales" GOSUB err

$t = "Connecting drive J:" GOSUB text
USE J: /del /persistent
USE J: "\\myt-1001\market" GOSUB err
ENDIF

ENDIF

GOSUB debug
RETURN

Top
#73977 - 2003-03-11 09:39 PM Re: Group Mapping issues
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Does this work on NT but not on Win9x? Do you use the KXRPC service? Is this a global or local group?

Extra info: http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=006785#000001

Try not including the "=1" in the ingroup line.

code:
IF INGROUP ("sales")
$t = "Connecting drive I:" GOSUB text
USE I: /DELETE
USE I: "\\myt-1001\sales" GOSUB err

$t = "Connecting drive J:" GOSUB text
USE J: /del /persistent
USE J: "\\myt-1001\market" GOSUB err
ENDIF
Else
? "Not is the SALES group"
ENDIF

or id you use the MapDrive UDF:
code:
IF INGROUP ("sales")
MapDrive ("I:", "myt-1001", "sales")
MapDrive ("J:", "myt-1001", "market")

Else
? "Not is the SALES group"
ENDIF


Function MapDrive($Drive, $Server, $Share)
Dim $Drive, $Server, $Share
Color c+/n
If $Drive<>"" and $Server<>"" and $Share<>""
$LogText="Connecting $Drive to \\$Server\$Share"
? $LogText
USE $Drive /Delete /Persistent
USE $Drive "\\$Server\$Share"
If @error=0
color g+/n
$x=" - Success"
"$x"
Else
color r+/n
$x=" - Failed: Error @error"
"$x"
$ErrorState=1
Endif
WriteLog ($LogText + $x)
Color w+/n
Else
WriteLog ("Function 'MapDrive' called with invalid parameters: '$Drive', '$Server', '$Share'")
Endif
Endfunction



[ 11. March 2003, 21:40: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73978 - 2003-03-11 10:55 PM Re: Group Mapping issues
Mabraham-ca Offline
Fresh Scripter

Registered: 2003-02-17
Posts: 30
Loc: Toronto
Thanks Howard,
Currently I am trying with Windows 98 however, I would like to test same script in other clients later.

KXRPC is installed in the server and all the kix files are copied in the Netlogon directories of the W2K server and System directories of the Windows 98/95 clients.
Sales is a local group- I have seen several articles saying w95 can not map Global groups - is there is any alternative solutions to this?
Thanks Again.

Top
#73979 - 2003-03-11 11:12 PM Re: Group Mapping issues
Mabraham-ca Offline
Fresh Scripter

Registered: 2003-02-17
Posts: 30
Loc: Toronto
Howard, I test both codes and did not see any changes to the issue.
Actually Sales is a Global Group NOT a local group.

Top
#73980 - 2003-03-12 05:48 AM Re: Group Mapping issues
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
KXRPC must be installed on all severs. Win9x clients require all 3 of the extra DLLs & normally you would put these in the netlogon share only. Also make sure replication is running to all servers.

Putting the kix files in both the client system directories & netlogon is dangerous, you can get conflicts between kixtart versions. The Kxrpc, exe, & DLLs must be the same consistent version throughtout your network.

Also, include some error checking in the script to verify where it is actually failing.

[ 12. March 2003, 05:50: Message edited by: Jack Lothian ]
_________________________
Jack

Top
#73981 - 2003-03-12 08:42 AM Re: Group Mapping issues
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
actually, for ingroup() check to work for global groups, you have no need whatsoever to install kxrpc!
that is clearly stated in manual.

that's also why I have never installed it!

if test-code like:
code:
if ingroup("sales")
"we are in group sales! :D"
else
"we are not in group sales! :("
endif
?
"press any key to continue"
get $keypress

does not work, there is 3 possibilities:
1) you don't have group sales
2) the group is not global after all
3) you are running wrong script

there is nothing more to it.
_________________________
!

download KiXnet

Top
#73982 - 2003-03-12 01:44 PM Re: Group Mapping issues
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
When you ran the script with the UDF, did it tell your that "Not is the SALES group" or did it attempt to map the drives? If it attempted to map the drives, what was the return code? You previous posts contained no useful information.

This post:
quote:
Thanks Howard,
Currently I am trying with Windows 98 however, I would like to test same script in other clients later.

KXRPC is installed in the server and all the kix files are copied in the Netlogon directories of the W2K server and System directories of the Windows 98/95 clients.
Sales is a local group- I have seen several articles saying w95 can not map Global groups - is there is any alternative solutions to this?
Thanks Again.

indicates that "Sales" is a local group. Local group where? On the logon domain, your resource domain? In that case you should specify:

ingroup ("\\server\sales")

When using local group you will need to use the KXRPC service.

I am not sure what you mean by
quote:
I have seen several articles saying w95 can not map Global groups
The KiXtart INGROUP function works best (no helper app KXRPC server needed) with determining membership in a GLOBAL group.

[ 12. March 2003, 13:46: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#73983 - 2003-03-12 10:14 PM Re: Group Mapping issues
Mabraham-ca Offline
Fresh Scripter

Registered: 2003-02-17
Posts: 30
Loc: Toronto
After I removed the "$t = "Connecting drive I:" GOSUB text" statement from the command - it mapped the drive correctly.
Could any one please describe what that statement do . Thanks. Mathew

IF INGROUP ("sales") = 1
$t = "Connecting drive I:" GOSUB text
USE I: /DELETE
USE I: "\\myt-1001\sales" GOSUB err

Top
#73984 - 2003-03-12 10:25 PM Re: Group Mapping issues
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
GOSUB text GOes to the SUBroutine that starts with label :text and which should have an ending RETURN somewhere. Without the actual code posted by you that's about all I can say.
_________________________
There are two types of vessels, submarines and targets.

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
1 registered (Allen) and 781 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.058 seconds in which 0.026 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