locked
Windows 7 - Logon in progress variable? RRS feed

  • Question

  • I'm trying to implement a script which shuts down a Windows 7 PC if nobody is logged on.

    I have it running as a Scheduled Task.. all works fine, BUT if a logon is in progress (ie on the Welcome screen) when the script runs, it appears to believe nobody's logged on.. is there a variable/reg key which is set when a logon is initiated?

    Alternatively, could there possibly be a "time since last user interaction" or "time of last user interaction" variable which I can make use of?

    Thanks in advance!

    Saturday, December 15, 2012 7:16 AM

Answers

  • Check the event viewer. It has several events that get recorded the very moment when a logon process commences.
    • Proposed as answer by Frederik Long Saturday, December 15, 2012 9:24 AM
    • Marked as answer by Leo Huang Friday, December 28, 2012 9:17 AM
    Saturday, December 15, 2012 7:24 AM

All replies

  • Check the event viewer. It has several events that get recorded the very moment when a logon process commences.
    • Proposed as answer by Frederik Long Saturday, December 15, 2012 9:24 AM
    • Marked as answer by Leo Huang Friday, December 28, 2012 9:17 AM
    Saturday, December 15, 2012 7:24 AM
  • Ooh, great idea!! I only remember the event viewer when tracing faults!!
    Thank you!

    Saturday, December 15, 2012 7:29 AM