I want to write a program that would log a user off from an Winnt 4 workstation or a Windows 2000 prof. machine if he has been idle (if the keyboard or mouse hasn't been used for, say an hr).

Can anyone offer any suggestions or code snippets as to how I should go about doing this? Thanks.