in reply to Accessing workgroup names using perl

I'm not a huge expert on Windows NT, but couldn't you run the 'net' command from inside a perl script and simply process the output to get the desired result? Find some detailed info on the 'net' command: here.

my @net_info = `net config`; # @net_info should contain lines of output # produced by the 'net config' command. # I hope they should contain work group info? while (@net_info) { # parse the line here... print "$_\n"; }


_____________________
# Under Construction

Replies are listed 'Best First'.
Re: Re: Accessing workgroup names using perl
by earthboundmisfit (Chaplain) on Jun 19, 2002 at 18:26 UTC
    Perhaps that works on NT4 only?? For Win2K try:
        my @net_info = `net view`;
    
Re: Re: Accessing workgroup names using perl
by caedes (Pilgrim) on Jun 19, 2002 at 19:18 UTC
    You'll only get a list of workgroups (or domains) if you use 'net view /DOMAIN'. This works on Windows 2000.