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.

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.

  • 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 '14 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.