http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netwkstasetinfo.asp

NetWkstaSetInfo

The NetWkstaSetInfo function is obsolete. The function configures a workstation with 
information that remains in effect after the system has been reinitialized.


-----Original Message-----
From: John Deretich [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 11:21 AM
To: 'Krummel, James C - PGGC-6'
Cc: Perl-Win32-Admin-Request (E-mail)
Subject: RE: signoff message


Hi James,

I tried using the following snippet
of code in my script to determine
who's logged on to there machine:

if ( Win32::Lanman::NetWkstaGetInfo( $Machine, \%Info, $bExtendedInfo ) ) {
                print " $Info{computername} \n";
            print " $Info{logged_on_users} \n";
            }

my manager wants me to go this way instead of sending a logoff message.
But I am getting more than one user logged on to one machine, 
which it should be showing only one user logged on.
Would you know why?

thanks,

John

-----Original Message-----
From: Krummel, James C - PGGC-6 [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 7:50 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: signoff message



John,

You can also open the HKEY_Users registry hive and go through the root key
names.  Domain accounts will start with "S-1-5-21".

James Krummel

>From: John Deretich <[EMAIL PROTECTED]>
>To: "Perl-Win32-Admin-Request \(E-mail\)"
<[EMAIL PROTECTED]>
>Subject: signoff message
>Date: Fri, 7 Mar 2003 13:08:54 -0800 
>
>Hi,
>
>I was wondering if there's a win32 module
>that can tell if a user is logged on to there machine?
>
>thanks,
>
>John
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to