Bill,Your example of IF INGROUP = () is not correct but I figure that was a typo.
Here's a small snippet from my script:
;
; Exit if this is an R&D user
;
if ingroup("R&D")<>0
exit
endif
All I'm testing for the whether or not the user is a member of a group, be it local or global. It just doesn't get more basic than that. Of course my problem is that (for me) the INGROUP test ALWAYS returns zero, no matter what.
I've used several methods of determining the results, including single stepping the code, adding debug code and sending the results to either a file or the screen, etc. There is no doubt, no ifs or maybes. The function always returns a zero.
When making changes I first run the script via the command line on a client machine to ensure there are no syntax errors. I then upload it to the PDC and wait for it to replicate to all BDCs (I get a message when this happens) prior to logging off and on again to see what I get.
As to the other part of your reply, the behavior of the script is correct for a result of zero, so it's not as if it was performing correctly but looking wrong (although it was certainly worth asking).
For instance, the part of the script quoted above never causes the script to terminate, even if the user is in the R&D group. If I use the INGROUP() function for drive mapping, which is one of the things I want to do, nobody gets any drives mapped.
As part of my testing I have created several groups, both local and global, and put myself in them.