Not sure where to post this so please move it if its in the wrong place
I need to get a small script that will run localy on a PC and return a True or False result if any one is logged on.
We have a cluster based computing system (A bit Like Boinc or Folding at home) whcih uses the spare CPU cycles of peoples PC's to carry out complex mathmatical modeling.
At the momen it is running on a of network cluster of about 12 PC's, but that is really just a test and what we want to do is run it on actuly desktops (around 300+ ) but only while there is no one logged on.
And althouh the software does not have a built in method for detecting if any one is logged in to the system, it can accept a TRUE/FALSE return statmets from a script that is set to run periodiolicy.
Now I looked at PSlogged on from sysinternal which give me the following out put
H:\>psloggedon -x
loggedon v1.33 - See who's logged on
Copyright ® 2000-2006 Mark Russinovich
Sysinternals - [URL="http://www.sysinternals.com"]www.sysinternals.com[/URL]
Users logged on locally:
NT AUTHORITY\LOCAL SERVICE
NT AUTHORITY\NETWORK SERVICE
workdomain\devilwah
NT AUTHORITY\SYSTEM
No one is logged on via resource shares.
so from that I am sure there is a way to run it through a script to check only the Local service, Networkservice and system are logged on. But I am not sure how to do this.
Even better would be a way to have a single script do the whole job.
I have looked around but I can't find anything, so I was wondering if any one can help?
Cheers
DevilWAH