On a side note...Did a bit of testing here...The XDClientName.exe throws an error when run on the PC side since it is trying to use a dll that is only present on citrix servers. So may have to verify that its a server in the BAT file before running.