We've met a problem using RDP: unable to force log-off the remote session. That means, when we, let's say, press "Escape" button on the remote host, the session is logged off, our server gets corresponding event
and everybody is happy.
BUT sometimes we have to disconnect "by force". In this case, after
the session is left open, and that's not good.
method, but it gets function delegate as a parameter, and executing this function results in actions on the host and not on the remote one
We tried to call Shutdown.exe, but it can't logoff remote hosts (options "/l" and "/m //servername" cannot be used together).
So, there're two questions:
- How to close remote session ?
- How does rdp.invoke() works ?
Any help will be highly appreciated.