i have a Remote Destkop Server (Terminal Server) installed on Win2008r2. There are 8 users that will logon from different thin clients and every user has two network printers connected.
My problem is, I want to set default printer depending on the thin client from which the user establish the connection. They only disconnect and reconnect to the session, they don't logoff and logon again.
i've already tried a scheduled task with the beginning trigger "On connection to user session" with the following command:
if %clientname% == THINCLT01 rundll32.exe printui.dll,PrintUIEntry /y /n \\printserver\printer1
... but unfortunately, the var %clientname% could not be resolved at the sheduled task. If I execute it in CMD while the user is logged on, it could be resolved and the command works without any problems.
Do you know a way to provide the default printer at the sesseion reconnect?
Thanks in advance!