Is there anything that provides system idleness ? We want to use C# to get the idle time for the system across all sessions and put the machine to logout if nobody is using the machine for X minutes.
any idea about this …..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are running a terminal server this can be done through group polices or through terminal services configuration
Server 2003
Server 2008
Server 2008 R2
To log off a desktop session you will need to have a program that runs in the background (this will not work as a system service, it must be running as part of the interactive session) that will check the login time with
GetLastInputInfo, it then can callExitWindowsExto log off.I needed to do this once and had trouble finding sources and this may help someone else who is goggleing this kind of question. So even though I am answering, I am down voting the question.
UPDATE: Here is a technique to get this to run as a service