I'm trying to create a Bundle that will run shutdown.exe on a nightly schedule to power off idle machines. The process behind this should be simple:
- if user is logged in display a message advising user to save their work
- if user is not logged in (i.e. machine stuck on logon screen) execute the command with no message
- wait 10 minutes
- shut down
However this seems to be much more difficult than it needs to be as ZCM seems to offer no way to tell if a user is logged in (not a Primary User as our classroom machines get used by *lots* of different people!) As a result any attempt to use the message portion either as part of shutdown.exe or in a Bundle leads to failures in the log as there's no user session to display the message in!
Any suggestions? Have already raised a feature request but that won't happen in the very near future so is there a workaround I could use in the meantime