A customer of mine needed to be able to map a printer on a client computer tunning TS client to an LPT port in the TS Session… After a little googling I found a cool little utility at DABCC called ENVTSCIP from Ctrl-Alt-Del IT Consultancy. These guys has a couple of cool tools for TS and Citrix.
ENVTSCIP together with a little script it takes the client IP address and puts it in an environment variable.
Links: