#39831 - 2003-05-01 10:07 PM
Logical OR/Ingroup
|
Anonymous
Anonymous
Unregistered
|
Could someone help me with the following code,please:
IF INGROUP("\\@WKSTA\Administrators") <> 1 or INGROUP("\\@WKSTA\Power Users") <> 1
This code works only if the user belongs to the workstation's Administrators group. If I remove and put the user in the Workstation's Power Users group then the code doesn't work.
This is to be used as part of a logon script to check whether the user belongs to EITHER of the two local groups mentioned.
Thanks.
|
|
Top
|
|
|
|
#39832 - 2003-05-01 10:10 PM
Re: Logical OR/Ingroup
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
ktt,
Welcome to the board..
You should be able to do this -
IF INGROUP("\\"+@WKSTA+"\Administrators")=0 OR INGROUP("\\"+@WKSTA+"\Power Users")=0
HTH,
Kent
|
|
Top
|
|
|
|
#39836 - 2003-05-01 10:37 PM
Re: Logical OR/Ingroup
|
Anonymous
Anonymous
Unregistered
|
I'm using Kix32.exe version 4.2 on a Windows 2K Pro.
|
|
Top
|
|
|
|
#39838 - 2003-05-01 11:14 PM
Re: Logical OR/Ingroup
|
Anonymous
Anonymous
Unregistered
|
Just tried Sealeopard's suggestion and it worked! Thanks everyone.
|
|
Top
|
|
|
|
#39839 - 2003-05-25 06:33 PM
Re: Logical OR/Ingroup
|
kzoo
Lurker
Registered: 2003-05-25
Posts: 1
Loc: bosnia
|
ok... i'm a REAL novice to KIX scripting... I most certainly see the benefit.. and with much practice hope to be able to take my training wheels off one day...
ok.. my question is how do i get the 'ingroup' function to work with remote computers? My environment is setup such that users execute a simple dos batch file which maps drives. I would like to add the flexibility to map according to group membership on a local server, not a domain controller. I can get 'ingroup' to work with either groups on the local computer or on the domain, but not on a stand-alone server.
The stand-alone server has all groups in place... and this server is not a member of the domain.
According to http://www.kixscripts.com/define.asp?id=54, it seems that all I need to do is use the following command:
IF INGROUP("\\SERVERNAME\SHARENAME") = 2
but I cannot get it to work.
Oh... I'm using kix ver. 4.21
Thanks in advance for your help... -cs
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|