How to list all groups on a Server
Keywords: groups on Novell server
Question:
I want to list all groups on a server, not just for a particular user. Is there a trick to do this? I tried a wildcard, but it failed. Also, I would like to list all users on a server. I want to use these in listboxes, but can't find a way to do it with an extender or otherwise.Answer:
In Netware 3, we cannot list all users or groups on a server.In Netware 4, the n4ObjectInfo function may be of help. But you can still do it in the following way:
Write a BAT file that dumps the groups to a file. I don't know the command but it would look something like:
REM this is LISTGRP.BAT nlistgrp /all > c:\temp.txtThen you have a WinBatch script:RunWait("LISTGRP.BAT","") fs=FileSize("C:\temp.txt") bb=BinaryAlloc(fs) BinaryRead(bb,"c:\temp.txt") list=BinaryPeekStr(bb,0,BinaryEODGet(bb)) BinaryFree(bb) list=strreplace(list,@crlf,@tab) thisone=AskItemList("Title",list,@tab,@sorted,@single) Message("Selected Group",thisone)Now make a shortcut ot PIF file to LISTGRP.BAT that has two very important items checked.Debug it. Make it work. 100%.
- Close Window on Exit
- Run as a window (not full screen)
After you have it all working and DEBUGGED!!:
Change the RunWait to RunHideWait in the WBT file so the users don't see it.
Article ID: W13608Filename: List all Groups on a Novell Server.txt