OK for theses points but %userprofile% can be used only in the user context.

first point : if you want to do something remotely, %userprofile% is YOUR profile, not the user's one.
second point : BradV said that the user is not logged on so there is no %userprofile% !!!
third point : to modify the roaming profile, it is absolute necessary to be sure that the user is not logged on because if he is, when he disconnects, the local profile is reloaded to the central point and remote modifications are overwritten !!!
_________________________
Christophe