Try using the Win32::NetAdmin module's LoggedOnUsers function.  I haven't tried it 
myself, but it's supposed to do what you describe.

Paul

>>> "Royer, Robby E (Compaq)" <[EMAIL PROTECTED]> 1/9/2003 1:53:21 PM >>>
I am working on developing a script that will go out to a list of computers
that are on the network and determine who is currently logged onto the
workstations, these workstations are both NT 4.0 and 2000, the below script
seems to work with the 2000 workstations but not the NT 4.0 boxes. Can
someone point me in the current direction

thanks
robby

GetUser.pl

use  Win32::TieRegistry;

$computer =
$Registry->{"\\\\navairns01\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\
Control\\ComputerName\\ActiveComputerName\\ComputerName"};

print "the computer is $computer\n";

$user =
$Registry->{"\\\\navairns01\\HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Window
sNT\\CurrentVersion\\WinLogon\\AltDefaultUsername"};

print "the user logged on is $user\n";




ActivePerl mailing list
[EMAIL PROTECTED] 
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED] 
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 



_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to