We have some HP T5145 thin clients which we use as point of sale systems. Each one has an Eposn receipt printer connected to the parallel port. When we connect the session to the Terminal Server, the printer is mapped and we can print to it from Windows. The problem is that our POS system needs the printer to be mapped to an LPT port.
I can manually create a new printer, and manually select the TS003: PRN1 (or whatever) port that the client has connected on, share the printer and the use "net use" to map the correct LPT port but I need to be able to script this.
1. Find current TS session number
2. Create new printer using this session number and share
3. Net use ... etc