Riporto alcuni passi di un articolo trovato su internet per la gestione delle stampre sul Terminal Server
By definition, client printers are already set up and configured on the client devices, so there is nothing else that you need to do there. All client printer mapping configuration is done on your Terminal Servers. From a high level, allowing users to print to their client printers involves two steps:
Since client printers will only work when the printer drivers are installed on the Terminal Server, the first thing you need to do when using client printers is make sure that the proper drivers are installed on your server. In the real world, there are many issues associated with the installation and management of printer drivers on Terminal Servers. We'll look at the specific details in the “Managing Printer Drivers” section of this chapter.
After the printer drivers are installed, you need to configure your Terminal Server to connect clients' printers when their RDP sessions are started. To do this, you'll have to configure Terminal Server permissions, the RDP connection listener, and the user's domain account properties.
In order for users to be able to print on a Terminal Server, users will need Read, Write, Execute, and List Folder Contents access to the print spooler's directory, %SystemRoot%\System32\Spool . Even though these are not the default settings for Windows Server 2003 “out of the box,” these settings have been a Terminal Services best practice since the beginning of Terminal Services.
With the Terminal Services Configuration tool, you can configure the client printer options for all users that use a particular connection. In the “client settings” tab section of the connection properties, make sure that the “Windows printer mapping” and “ LPT port mapping” boxes are not checked in the “Disable the following” section. Obviously, checking either one of these boxes will prevent client printers from being mapped.
Also, if the “Use connection settings from user settings” option is checked, then you will need to verify that the user's account is properly configured for client printer mapping.
Instead of configuring these options as an RDP connection property on each server, you can apply them via a GPO . (See Chapter 6 for more information about GPOs.) These client printer mapping properties can be found within a GPO via the following path:
Computer Configuration\Administrative Templates\ Windows Components\ Terminal Services\Client Server Data Redirection
The settings configured here will then apply to any Windows 2003 Terminal Server that is in an OU where this GPO has been applied.
You can also configure client printer connection settings on a user-by-user basis. In Active Directory environments, the client printer mapping properties are part of the user's AD object (Active Directory Users and Computers | User Object | Environment Tab).
Selecting “Connect Client Printers at Logon” will cause the user's client printer to automatically be created when they log onto a Terminal Server. When the user logs off and all his print jobs have printed, the printer is automatically deleted. If you do not set the “Connect Client Printers at Logon” option, a user will still be able to manually map to his client printer, it just will not be created for him automatically.
Whether you use client-mapped printers or server printers, you'll need to have printer drivers installed on each of your Terminal Servers. Consequently, you will need to spend some time thinking about how to manage those printer drivers. Before we address this issue, however, let's look at what printer drivers really are, how they work, and how they're stored on Windows servers.
Fundamentally, Windows printer drivers translate print jobs from an enhanced metafile format, which is printer-independent, into the native language that can be understood by a printer. This is why a printer prints garbage when you use the wrong driver. Printer drivers need to be installed and registered on a computer before they can be used.
Two things happen when you install a printer driver onto a Terminal Server or Windows 2000 server. First, the necessary printer driver files are copied from the source location to the server. The server stores printer driver files in the %systemroot%\system32\spool\drivers\w32x86\3\ folder. In this path, the “ w32x86 ” signifies an Intel Windows 32-bit platform, and the “ 3 ” signifies the version of the printer driver (3 = Windows 2000/XP/2003).
Second, the driver's details are written to the registry in this path: HKLM\System\CurrentControlSet\Control\Print\Environments\Windows NT x8 6\Drivers\Version-3\. Similar to the file path, a Version-3 key means that the driver is a Windows 2000/XP/2003 driver.
User's individual printer settings, such as print, duplexing, and paper tray options, are stored in the HKCU\Printers registry key. These settings are user-specific and stored in their profile, just like any other customized Windows settings.
Installing print drivers onto a Terminal Server is no different than installing printer drivers onto any Windows computer.
The easiest way to install a driver without actually installing a printer is via the “Printers and Faxes” applet. (Start | Printers and Faxes | File Menu | Server Properties | “Drivers” tab | “Add” button) On a Terminal Server, it's only necessary to add the Windows 2000/XP/2003 version of the driver, since you're only installing the driver so you can print from server sessions.
If you have a lot of drivers to install, you can script the process using rundll32.exe to call the printui.dll (the Printer Properties User Interface).
If you're only using printers whose drivers are built-in to Windows 2003 (via the “ driver.cab ” file discussed previously) then you don't really have to worry about driver installation since the process is automatic when the printer is installed. However, if you have a number of drivers that are not part of the Windows 2003 install, you can script the following command to install a large number of printer drivers at once:
rundll32 printui.dll,PrintUIEntry /ia /m “ Driver Name ” /h “Intel” /v “ Version of driver ” /f \\Source\print.inf
To use this command, replace Driver Name with the driver's name as it appears in the .INF file, replace Version of Driver with the platform for which it was written, (generally Windows 2000 or XP) and replace the \\Source\print.inf with the path and .INF filename for the printer driver. For more information on using rundll32.exe for installing and removing printers and drivers, run “ rundll32 prinui.dll,PrintUIEntry /?” from a command prompt. When using this command, note that there is a comma with is no space between the word prinui.dll and PrintUIEntry .
Removing Printer Drivers
When you delete a printer from the “Printers” folder on one of your Terminal Servers, the drivers are not uninstalled from the server. This can be a problem if you've identified that a certain printer driver causes problems, since you need to be able to remove that driver from the server to prevent clients from using it.
Fortunately, the Printers and Faxes applet in Windows 2003 (and 2000) can also be used to remove drivers from your Terminal Server. (Start | Printers and Faxes | File Menu | Server Properties | “Drivers” tab | “Remove” button) Of course this will only remove the driver if no printers are currently using it.
Alternately, you can also use the “rundll32” command we used previously to remove the print driver. All that is required is the modification of a couple of switches. The cool thing about using the rundll32 method is that it can even be done from remote machines. Here are some examples of how to use the command line to remove a local driver and a driver from a remote server.
To remove a driver from a machine you are logged into:
rundll32 printui.dll,PrintUIEntry /dd /m “HP DeskJet 500” /h “Intel” /v “Windows 2000”
To remove a driver from a remote machine:
rundll32 printui.dll,PrintUIEntry /dd /c\\Computername /m “HP DeskJet 500” /h “Intel” /v “Windows 2000”
Make sure to replace Computername with the name of the server you are removing the driver from.
If all else fails (which unfortunately still happens, even with Windows 2003), you can manually remove a printer driver and all traces of its existence by following this procedure: