>>There's only the possibility to set the timeout (server side, if I'm right) to max, which should be several hours, maybe as many as 20.
>
>On the server side, that's true, I don't know of any way to reset the timeout counter from an app within the session - kind of defeats its purpose. But the client process on the client computer also sends keystrokes, mouse moves etc. back to the session on the TS - I'm thinking that's what counts as "activity". So, if the client process could be "automated" somehow, causing it to send keystroke/mouse traffic back to the TS session, that should reset the inactivity timer.
I really don't see a way how to get unpainted from that corner... the TS client is probably listening to messages from Windows, and checking whether there's anything that needs to be passed to the server. Nothing else seems to count as an activity.
Maybe we could run an app client side, find its hwnd (by the title, if nothing else works), then send a message to that window at some sufficient interval? Something like "you got a mouseclick at 1,1", or "I've pressed Shift and released it" - anything that wouldn't do anything.