I'd like to state my environment configuration first as follows:
- A Zebra label printer with serial port (RS232) (print script .bat uses serial port only)
- A serial cable (RS232) suitable for the printer.
- A RS232 to USB switch cable.
- A PC installed ubuntu 12.04.3 x86.
- A Hyper-V VM installed Windows 7 with SP1.
What I've tested and succeded:
- on ubuntu, type "sudo chmod a+rw /dev/ttyUSB0", and the type "echo ~WC > /dev/ttyUSB0", and this will print a test page on the printer successfully.
- in ubuntu printer configuration GUI, add the usb serial port as a printer, and print a test page in the GUI. Print successfully.
- on ubuntu, use freerdp (a most famous open source RDP client) to connect to the VM with "/printer" argument, it will redirect the local printer to Windows VM.
- In the Windows VM, I can see the redirected printer in "Devices and Printers", and I can print a test page successfully.
What I've tested but failed:
- In the printer's "Port" settings, it uses "TS004" or "TS005", the name is not fixed, it changes randomly...
- The users have many printer scripts (industry .bat) which use only "type xxx > COM1", I cannot ask them to change their scripts to "TSxxx". What's more, "TSxxx" changes.
My question:
- Can I make the terminal service port name "TS004" fixed?
- Can I map the terminal service port name to "COM1"?How to do that? (I tested "net use COM1 TS004" but it does not work)
Any hints are appreciated. Many thanks!~