I'm NOT in any way a Terminal Services expert and I need help trying to get an application program working in a multi-user and multi-printer environment. Each user has their own locally (USB) attached printer. Each of those shows up in the ts session with a unique name. The legacy application can only be configured to print to one printer. The configuration is global for users, local to the machine which is fine for individual workstations but not in ts which apparently presents as one machine for all users.
The issue is that the printer changes for every user that is logged in. The application needs to print NOT to the default printer, but to a "special" printer which is selected in the application... let's call it a label printer to simplify the explanation. You have your default regular printer, easy for the application to find that one, and then you have a special printer that labels get printed onto. The application needs to know what printer is the label printer. So we allow the user to select that in the application and the selection is stored in a config file in C:\ProgramData\mfgr\prog\setting files
I don't have access to the application so I can't change how this works or where the configuration gets stored.
In the "regular" world, selecting the label printer driver to use should be per machine, NOT per user. When a new user logs into a machine, the physical printer doesn't go "poof" and a new printer suddenly appear. Same printer for all users.
Yet in terminal services, the physical machine is "merged" with the virtual machine on the server. So each users real machine (and real printer) is injected into the "fake" terminal services machine. The name of the printer is made unique for each user. So the printers DO go "poof" and change names depending on the user logged into terminal services.
So user "A" logs in and sets up the application to print to "LabelPrinterForUserA" (or whatever the name of the printer happens to be), that setting is stored in the ProgramData subfolder, and all is well. Later, user "B" logs in, and when they print, the application tries to print to "LabelPrinterForUserA" which doesn't exist for user B. If user B re-configures, that breaks it for user A.
SOLUTION 1: The way that /should/ work (in my mind) is that you define one "generic" printer in Terminal Services... call it "Virtual Label printer" and when the user prints to it, the print job gets re-directed back to whatever physical printer is actually connected to their local workstation. There is a mapping or setup in Terminal Server that tells it which actual printer to use for each user when a job comes to the virtual printer. The application is told once to print to "Virtual Label Printer" for all users.
SOLUTION 2: Or... there should be some way to make the ProgramData sub folders separate per user. E.g. when user "A" tries to access: C:\ProgramData\mfgr\prog\setting files they actually get C:\UserData\UserA\AppData\mfgr\prog\setting files and user "B" gets C:\UserData\UserB\AppData\mfgr\prog\setting files
So the question I have is: Does either of those solutions exist hidden somewhere in the setup of terminal server? Or is there another way around this issue that I don't know?
To clarify, There isn't just one printer. There are multiple printers. Each user has a physical (let's call it label) printer USB connected to their physical workstation. My understanding from the admin is that when the users install their printers, the names of the printers must be different. Are you saying that each user can install their own printer and use exactly the same name?