Hi
This isn't elegant, but it will work
It involves running net user /domain for the current user & parsing the output
It involves some temporary files - I've put everything in C:\Temp in this example
@Anonymous off
net user /domain %1 > c:\temp\out.txt
- In your lisp code call it like this
(startapp "c:\\temp\\ad.bat" (getenv "USERNAME"))
- That will create a text file c:\temp\out.txt
- Open the file & read all the lines until you get to one that starts with Global Group memberships
- From that line to the end of the file you get a list of groups
Logon hours allowed All
Local Group Memberships
Global Group memberships *CADPRO-USERS *CADPRO-MANAGE
*CADPRO-VPN *Domain Users
*CADPRO-TECH
- Split each line to get the group names, which begin with a *
You can do it more elegantly using a tool like DOSLib - https://wiki.mcneel.com/doslib/home - which will allow you to hide the DOS window
Hope that helps
Nick