Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find out if users are logged on or not

Status
Not open for further replies.

VBVines

MIS
Jun 11, 1999
98
US
Does anyone have an idea of what the best approach to take to find out if users are logged in to a domain or not. Maybe a log could be generated giving logon times. Maybe a log somewhere. My users are w/95, w/98 and windows2000. Just looking for a push in the right direction. Thanks, aspvbwannab
 
I know an Env var whose name is "USERDOMAIN" When the user is logged, it contains the domain name on wich user is logged. Check it's value when not logged in to see if that can help.
To get it in VBS :
Code:
Dim WshSHell
Dim WshEnvironnement
Set WshShell = CreateObject("Wscript.Shell")
Set WshEnvironnement = WshShell.Environment()
msgbox "user is logged on domain" & WshEnvironnement("USERDOMAIN")
Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top