Caveats for using RemoteApp and Roaming Profiles

A colleague had the following case the other week:

We seem to be randomly losing settings like Printers, Application Settings, etc from users in our TS farm.
Sometimes the setting sticks, sometimes it has mysteriously disappeared the next time the user logs on.

We enabled Userenv debug logging on the involved systems as well as hacking together a small login/logoff script for all users that wrote to a central file which machine they were logging on to and the time & date. 

After some detective work we determined the following was happening:

ts_and_roaming_profiles

 

In short; RemoteApp uses the TS profile of the user, if you have loaded the profile in more than one location it will cause problems as the ‘last writer wins’ behavior of Roaming User Profiles will cause one or the other of the loaded profiles to be cause the other version to be discarded.

The resolution is to make sure that the profiles don't get opened in multiple places at the same time.