3

I just implemented BackInfo on our servers, deployed via GPO. Everything is working as intended while users and administrators log on and off.

Problems arise when a user disconnects and reconnects an RDP session. I don't know if it's BackInfo that gets put to the back of the actual wallpaper on re-connection, or if the wallpaper is somehow only held in that active session.

Since there's no logon session, the things under HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run isn't executed, so BackInfo.exe isn't run on a reconnect.

Googling this topic is hell, almost all I've found is Drive mapping policys, since i include the search term "reconnect". I did however stumble upon a solution from VMware via the VDM_Agent. "Sadly," we use Hyper-V, so the solution isn't targeted at us.

A possible solution would be to expire the RDP session in a small amount of time, but I would want my users to be able to disconnect, since it's a feature they have been in love with for a long time.

Maybe someone has been in the same situation, having to run a program on an RDP session reconnect.

1 Answer 1

2

Yeah... I have been in this same situation. I ended up writing a Windows service that would check for disconnected sessions using the API exposed in wtsapi32.dll, and then for each disconnected session, if the process I wanted wasn't running in that session, I'd use that person's token (which I can steal without needing to know that person's password, the reason why disconnected sessions are undesirable from a security standpoint) to launch a process as that user in their desktop using CreateProcessAsUser. That way when the user reconnected to their disconnected session, the desired program would be running on the user's desktop whenever they reconnected.

1
  • Thanks! , So now it's just a matter of wanting to spend the time doing this in order to get system information on the wallpaper.
    – Simon L
    Feb 14, 2014 at 11:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .