----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 05, 2001 4:11 PM
Subject: Can you determine if a user if logged on to a workstation remotely?


>
> Does anyone know of a way to query a workstation remotely and tell whether
or
> not someone is currently logged on?
>
> John
>
Have a look at Win32::Lanman. It has everything you need to find out what
you want to know.

use Win32::Lanman;

Win32::Lanman::NetWkstaUserEnum($server, \@info) || die
Win32::FormatMessage(Win32::Lanman::GetLastError())

@info is returned with an array of hashes, one for each locally logged on
user.

ego
Edward G. Orton, GWN Consultants Inc.
Office: 613-860-3186, Home: 613-764-3186, Fax: 613-764-1721
email: [EMAIL PROTECTED]

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to