Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


get all logged in users

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,32398
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> get all logged in users
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 get all logged in users - 3/19/2006 4:47:14 AM   
  bto78

 

Posts: 2
Score: 0
Joined: 3/16/2006
Status: offline
Hi!

I want to call a vbscript every day at 9 pm. This script should check, if there
is an user currenty logged in. The problem is, that I have to specify an user
for executing the script.

All the functions I already found, displays the user which I specified for
excuting the script.

Is there a possibility to read all currently logged in user?

Thanks!

Marc
 
 
Post #: 1
 
 RE: get all logged in users - 3/19/2006 5:07:42 PM   
  rOOs


Posts: 63
Score: 0
Joined: 2/28/2006
From: Switzerland
Status: offline
I used google and found this:

http://www.codecomments.com/archive300-2005-6-514817.html

and there i found this:

use psloggedon from the pstools suite to get all users currently logged on locally or remotely to the system and search through the output for the username...

(in reply to bto78)
 
 
Post #: 2
 
 RE: get all logged in users - 3/20/2006 4:06:09 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
I use the SysInternals tools all the time myself, but if you want to do this in a self contained fashion, you should be able to do it by iterating all the instances of the Win32_ComputerSystem WMI class and looking at each instance's .UserName property.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to rOOs)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> get all logged in users Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts