#73976 - 2003-03-11 09:24 PM
Group Mapping issues
|
Mabraham-ca
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
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 ]
|
|
Top
|
|
|
|
#73978 - 2003-03-11 10:55 PM
Re: Group Mapping issues
|
Mabraham-ca
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
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
|
|
|
|
#73982 - 2003-03-12 01:44 PM
Re: Group Mapping issues
|
Howard Bullock
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 ]
|
|
Top
|
|
|
|
#73983 - 2003-03-12 10:14 PM
Re: Group Mapping issues
|
Mabraham-ca
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
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 484 anonymous users online.
|
|
|