1

On a windows 8 machine, how can I execute a program whenever a user reconnects to a disconnected session?

The user might walk away from the machine, and the lock screen kicks in. I would like to execute something when they login again to the disconnected session.

This is not a fresh login, but a reconnection to their existing session.

Thanks

Trevor
  • 2,186
  • 3
  • 16
  • 18

1 Answers1

2

WM_WTSESSION_CHANGE provides this: http://msdn.microsoft.com/en-us/library/aa383828(v=vs.85).aspx

Related SO posts can be found with samples: Checking for workstation lock/unlock change with c#

Community
  • 1
  • 1
holtavolt
  • 4,378
  • 1
  • 26
  • 40