Michael B Allen wrote:
On Wed, 25 Oct 2006 10:06:53 -0700
"Free, Bob" <[EMAIL PROTECTED]> wrote:
whoami /groups
C:\Admin\Util>where whoami
C:\Program Files\Support Tools\whoami.exe
Not exacty "stock" but then again I consider Support Tools as an
essential part of an installation :-)
Well I can't ship that with my product.
I scraped up this VBS script that does the trick.
I'm not sure whether this affects your product or not, but it may be
worth considering nested groups, depending upon whether or not this
affects what you're doing and it is worth mentioning for this reason.
The vbscript you've written won't tell you if a user is a member of the
cute_pink_bunnies group which is a member of the Enterprise Admins
group, for instance - whoami /groups will.
There's a script up on the oreilly script center that does enumerate
nested groups, as well as a number of others online; you might be able
to draw some inspiration from that/them:
http://hacks.oreilly.com/pub/h/1128
Hope that helps..
- James.
--
James (njan) Eaton-Lee | 10807960 | http://www.jeremiad.org
Semper Monemus Sed Non Audiunt, Ergo Lartus - (Jean-Croix)
sites: https://www.bsrf.org.uk ~ http://www.security-forums.com
ca: https://www.cacert.org/index.php?id=3
--
List info : http://www.activedir.org/List.aspx
List FAQ : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/[email protected]/