That is a lot shorted than the code I was using. Thanks! Is there a way to determine the name of a machine via the IP address without using nslookup?
- Adam -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ramlakhan, Dave Sent: Friday, October 14, 2005 3:59 AM To: '[EMAIL PROTECTED]' Cc: 'Perl-Win32-Admin@listserv.ActiveState.com' Subject: RE: Remote User > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 13 October 2005 21:53 > To: Perl-Win32-Admin@listserv.ActiveState.com > Subject: Re: Remote User > > > Adam Stern <[EMAIL PROTECTED]> wrote: > >Is there a way to tell who is currently logged into another > workstation on > the network via perl? > > Have perl call and parse the output of nbtstat. If you're using perl 5.6 you can try Win32::Message to get the nbtstat message names, otherwise try Win32::NetAdmin #####BEGIN use Win32::NetAdmin; my $server = "rfh-infoflex"; my %userRef; if (Win32::NetAdmin::LoggedOnUsers($server,\%userRef)) { for my $user (sort keys %userRef) { print "$user is " . $userRef{$user} . "\n"; } } #######END unfortunately you appear to get all logged on users, including batch and service accounts _______________________________________________ Perl-Win32-Admin mailing list Perl-Win32-Admin@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list Perl-Win32-Admin@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs