Here is a batch file that returns the logged on user.  You need the reg.exe
program from the NT resource kit.  You could pipe the output to a file or
set a environment variable for testing.


FILE: WHOISON.BAT
@ECHO OFF
REM Supply machine name as parameter.  Example: whoison server1
reg query "HKLM\Software\Microsoft\Windows
NT\CurrentVersion\Winlogon\DefaultUserName" \\%1

Hope this Helps,
  

-----Original Message-----
From: Starks, Michael [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 2:39 PM
To: '[EMAIL PROTECTED]'
Subject: [SA-list] Checking if a user is logged in


Hello,

Is there a check to see if a particular user is logged in over a certain
amount of time?  If not, perhaps this could be scripted?  Thanks. To
unsubscribe from a list, send a mail message to [EMAIL PROTECTED] With
the following in the body of the message:
   unsubscribe SAlive
To unsubscribe from a list, send a mail message to [EMAIL PROTECTED]
With the following in the body of the message:
   unsubscribe SAlive

Reply via email to