Where and how to install AutoConnect?
AutoConnect configuration using the MMC
Sending and importing the configuration
Saving and importing the AutoConnect database
Syntax: Dynamic Printer Matrix
Syntax: Map Additional Printers
Disabling Windows printer mapping
With AutoConnect it’s possible to map printer objects automatically if shared printers can be used on a central, dedicated print server. AutoConnect is installed as a Windows service, and is supplied with the ThinPrint Engine package.
AutoConnect features
- Dynamic connection to shares on ThinPrint Servers (= printer mapping), based on various criteria, e. g.:
- Active Directory user or group name
- Printer name or printer group name
- Client (or host) name
- Client IP address, IP range or IP group
- Two methods for AutoConnect configuration:
- Using an MMC snap-in (recommended for single terminal servers or remote desktop session hosts)
- Using a Group Policy Object (recommended for virtual desktops and large environments)
- Support for Output Gateway
- Support for Virtual Channel Gateway
- Support for Connection Service
- Support for Management Services
Basic configuration
- ThinPrint Engine on a central print server
- AutoConnect, Virtual Channel Gateway and Output Gateway on the machine on which the applications run: remote desktops (terminal servers or virtual desktops) or workstations
- ThinPrint Clients on workstations and/or local print servers and/or gateway appliances (e. g. ThinPrint Hubs)
Where and how to install AutoConnect?
AutoConnect is installed on the same computers on which the applications run – using the ThinPrint Engine installer.
AutoConnect configuration using the MMC
The description below is recommended for configuring AutoConnect for single terminal servers.
Note! The AutoConnect configuration using group policies is described in ThinPrint group policies.
Using the MMC, you can configure AutoConnect locally as well as remotely; for remote configuration AutoConnect must be installed on both machines.
- Open the ThinPrint configuration.
- In case of remote configuration: In the ThinPrint node, click Add and then specify the computer address for each remote ThinPrint Engine to be configured.
- The ThinPrint Engine console appears. Select on the left, i. e., in the Console Tree: ThinPrint→ ThinPrint Engine→ AutoConnect.
Configuration
- Clicking on Edit will open the AutoConnect configuration.
Settings
General
In the General tab the default value for the connection protocol between AutoConnect and ThinPrint Clients can be selected. If you select TCP/IP or Virtual Channel (ICA or RDP), you restrict the communication to a protocol family. The Auto setting allows both protocol families and is therefore recommended for ICA or RDP as well as TCP/IP ThinPrint Ports. In Dynamic Printer Matrix (see below) you can limit this setting per rule; here, the columns T, I, R and P correspond to the protocols TCP/IP, ICA, RDP and PCoIP.
Furthermore, you can decide here which AutoConnect events are to be logged and displayed in the AutoConnect Diagnostics table (ThinPrint→ ThinPrint Engine→ AutoConnect).
For Configuration databases see Storage destination for AutoConnect settings.
Printer Creation
In the Printer Creation tab you can determine
- whether the users may manage their session printers themselves.
- See also ThinPrint Self Service.
- when the printers are to be created or mapped:
- Either at each session logoff / logon
- Or when disconnecting and reconnecting a session.
- Restart the TP AutoConnect Service afterwards.
Note! From the time when the Self Service option is enabled, the printers of users who log on to a session for the first time aren’t mapped automatically anymore. The tables Map Additional Printers and Dynamic Printer Matrix then provide the input for printers to be selected.
In case you use only the Map Additional Printers table for connecting printer shares you can speed up AutoConnect using the option Disable Dynamic Printer Matrix.
Default Printer
Using the settings in the Default Printer tab you can set whether the session’s default printer should be changed by AutoConnect and – if yes – which information is to be used to change it:
- either the last choice by the users in the session or in ThinPrint Self Service (Apply default printer from user settings)
- or the current printer of the relevant ThinPrint Client in case of using Dynamic Printer Matrix (Default printer set by administrator for ThinPrint Client has priority)
- or the Default column of the Map Additional Printers table (Default printer set by administrator in Map Additional Printers has priority)
Printers
Some settings in the Printers tab are provided for printer creation using templates. Since templates are only relevant for environments without ThinPrint Servers, this is described in ThinPrint Engine on remote desktops.
Other settings in the Printers tab relate to all printers, including those that are mapped from ThinPrint Servers.
If users carry out changes to printers themselves, then these will be stored in the configuration database for User-specific printer preferences (see the General tab), if the Automatically save changes to printer properties option is enabled here.
If these stored settings are to be applied to newly created printer objects, or those yet to be connected, then the Create printers with user-defined properties option must also be enabled.
Note! For transfer of printer properties from ThinPrint Clients to Output Gateway objects on print servers or Management Services can be used alternatively.
High Availability
See High availability and load balancing.
IP groups
When using the AutoConnect tables Dynamic Printer Matrix and Map Additional Printers you don't need to enter each IP address or IP range individually. For simplicity, you can instead – optionally – define groups and use these in the tables.
- In the AutoConnect configuration console, select Groups→ IP Groups→ Add Group.
- Enter a name for the group (e. g. building 1), use the button (see arrow), and enter in all the relevant IP addresses or IP address ranges. Confirm with OK or Apply.
Don't use an underscore ("_") as character in a group name.
The result is shown in following screenshot.
Other options available here:
Menu | Description |
Add Group | create an IP group |
Edit Group | change the properties of an IP group |
Duplicate Group | generate a second IP group with the same members – for example, to create additional groups more quickly |
Remove Group | delete the IP group in question |
Refresh | update information from the AutoConnect database |
- Now you can assign the IP group to a currently selected row in the AutoConnect tables Dynamic Printer Matrix or Map Additional Printers.
Do so using the Apply selected function. Confirm with OK or Apply.
The result is shown in following screenshot.
When you've done all changes then you need to acknowledge them.
- By clicking Publish you acknowledge your changes and they will be saved in the given AutoConnect database (see Storage destination for AutoConnect settings) or by clicking Discard All no changes will be saved.
Printer groups
Similarly as for the IP groups, and especially in the AutoConnect table Map Additional Printers, you don’t need to individually enter every network printer shared on a central print server. For simplicity, you can instead – optionally – define and apply groups. The printers are then displayed sorted by groups in the Self Service console.
Note! If you create printer groups to display them in the Self Service console, avoid adding printers to multiple groups, as these printers will only appear to users in one of these groups.
For similar printers in the Dynamic Printer Matrix, you can use Variables instead.
- In the AutoConnect configuration console, select Groups→ Printer Groups→ Add Group.
- Enter a name for the group (e. g. Marketing).
- Select one of the two options Select printers from→ Print Server (upper arrow in following illustration) or Select printers from→ High Availability Print Server Group (middle arrow). Your choice here is determined by whether the printers you are getting are from a single print server in the printer group or from a print server in an HA group (high availability).
- For each printer, use the button to add a line manually, or simply use the button to select the desired printers from either the print server or the HA group specified above (lower arrow).
- If you used the button, all the shared printers from the specified print server or the server group (HA) will appear. Use the checkboxes to select the desired printers. Confirm with OK.
- The selected printers now appear in the printer group. In the Default column, select a default printer for the session, if it has not already been determined by other means (e.g. designated in the user’s ThinPrint Client or selected by ThinPrint Self Service). Confirm the printer group creation with OK or Apply.
Legend:
Icon/Information | Description |
Printer Group Name | a name for the printer group |
Select printers from→ Print server | specify a single print server from which the printers in a printer group should be received |
Select printers from→ High Availability Print Server Group | specify a print server group, from which the printers in a printer group should be received |
color printing possible | |
grayscale/black & white printing | |
print on both sides (duplex) possible | |
print on one side (simplex) | |
London | Location field of the original printer |
Created by ... | Comments field of the original printer |
More options available here:
Menu | Description |
Add Group | create a group |
Edit Group | change the properties of a group |
Duplicate Group | generate a second group with the same members – for example, to create additional groups more quickly |
Remove Group | delete the group in question |
Refresh | update information from the AutoConnect database |
- Now you can assign the printer group to a currently selected row in the AutoConnect tables Dynamic Printer Matrix or Map Additional Printers.
Do so using the Apply selected function. - Confirm with OK or Apply. The result is shown in following screenshot.
When you've done all changes then you need to acknowledge them.
By clicking Publish you acknowledge your changes and they will be saved in the given AutoConnect database (see Storage destination for AutoConnect settings) or by clicking Discard All no changes will be saved.
Dynamic Printer Matrix
The Dynamic Printer Matrix lets AutoConnect map the printer shares created on the central, dedicated print servers to the desktop sessions. You can precisely control which user is to get what printer. This table requires a ThinPrint Client on the user’s workstation or terminal as well as a ThinPrint Engine on the print server(s). For all other shares, use the Map Additional Printers.
- Select Dynamic Printer Matrix in the console tree.
Configuration
Double-clicking in the table will open the Dynamic Printer Matrix configuration console. Use the buttons (top left) to edit the table.
See Syntax: Dynamic Printer Matrix (below) when you want to use filter rules like IP ranges or AD groups.
Legend:
Table element | Meaning |
inserting a row above the current one | |
inserting a row below the current one | |
removing selected rows | |
moving a row up | |
moving a row down | |
• rule 1: locally on a client machine created printers won’t be included • rule 2: shared printers connected to a client machine won’t be included; their names contain a backslash (\) at the first position (see Printer Name column) | |
• import from a CSV file (this can be created using the Management Services) Caution: Existing rows will be overwritten – without warning! | |
IP Range/Group | IP address, IP range or IP group in which the client is located |
Client Name | client’s hostname; multiple clients are separated by the pipe character (example: client12|client13|workstation27) |
Driver Name | printer driver name |
Printer Name | printer name; with local connected printer shares a backslash (\) is on the first position |
Class Name | name of (any) printer class |
User/Group | user or group from the Active Directory |
W | Windows clients allowed |
A | Apple Macintosh clients allowed |
L | Linux/Unix clients allowed |
J | Java clients allowed |
T | Thin clients allowed |
x | other client types allowed |
T | protocol: ThinPrint TCP/IP |
R | protocol: RDP |
I | protocol: ICA |
P | protocol: PCoIP |
Target Printer | • shared printer in the network • syntax: \\print-server\share-name • variables can be used here |
• in the Target Printer column: finding shared printers in the network • Here, simply the print server name must be given, then a list of all printers of this server will be shown. • see also Input modes for search | |
Comment | any comment |
Note! In ThinPrint versions before 11.0, AutoConnect has treated a single hidden protocol column as not matching. If, for example, an ICA type of ThinPrint Client was detected by AutoConnect and the ICA column was hidden then no rule (row) of Dynamic Printer Matrix was matching. With version 11, the new functionality of a hidden column is that this column is ignored within each rule (row). This means that it would not matter whether the respective protocol or client type is true or not.
Input modes for search
The search box can be used in two ways:
- Direct search:
- Even when entering just one character, all matches are listed immediately. With every additional character, the number of matches decreases accordingly.
- Debug search:
- By using keywords, an AutoConnect query can be simulated. Here, the entries are not only compared to the entries in the table (as opposed to Direct Search), but the entries are evaluated.
- So, you can easily see the relevant rows for a specified client or user. This can be helpful for support purposes.
- When entering more than one key, use commas to separate.
- Keys: IP, Client, Driver, Printer, Class, User
- If you enter a user name, also user groups in which the user is a member will be found.
- With IP addresses also IP ranges will be found in which the entered IP address is enclosed.
- If you enter words, items with wildcards will be found if the entered string and an item match.
- Checkbox search in columns: <key>:true
- Keys: Win, Mac, Linux, Java, Thin (for thin clients), CE (for Windows CE), TCPIP, RDP, ICA
Example for debug search:
User5 from the domain ourdomain.local establishes a session from Client7 with the IP address 192.168.14.10. To figure out the very rows used by AutoConnect, you could enter:
IP:192.168.14.10, Client:Client7, User:ourdomain\user5
Table functions
You have the option of hiding unneeded columns. In all cases, hidden columns (and their rules) are deactivated.
Functional principle
When AutoConnect is executed, it processes the table from top to bottom, for each printer activated in ThinPrint Client. If all criteria (columns) in one line are met for the first printer AutoConnect searches for the share specified in the column Target Printer and establishes a connection to this printer share during the session. AutoConnect now stops the search for this printer in the table and, if applicable, continues the same procedure for the next activated printer in ThinPrint Client etc.
You can change AutoConnect’s processing sequence by using the arrow keys ( ) to switch the line order. You can also add or delete lines. In the table, * and ? can be used as wild cards. The Target Printer column represents the shares on the central, dedicated print server(s).
These features are explained in the scenarios below; the scenarios can also be combined with each other.
IP range/group
In addition to IP groups, the IP Range/Group column of Dynamic Printer Matrix or Map Additional Printers table could contain, for example, the following entries:
192.168.1.136
192.168.1.1–192.168.1.150
192.168.1.0 / 24
192.168.128.0 /22
192.0.0.0 / 8
A separate printer share is to be given as each target; printers with different properties will thus be mapped in the respective session.
The default value is: 0.0.0.0–255.255.255.255
The 24 represents the following subnet mask: 255.255.255.0; i. e., 3 x 8 = 24 set bits (22 is equivalent to 255.255.252.0; 16 is equivalent to 255.255.0.0; and 8 is equivalent to 255.0.0.0).
Scenario: Network printers in remote offices or office floors
ThinPrint: users should have their closest printers mapped when they open a session
Each remote office (or floor) uses a different client name (both for workstations and for local, external and internal print servers). In this way, different printers on different workstations can be mapped using the client name.
The Client Name and Target Printer columns on Dynamic Printer Matrix or Map Additional Printers table could contain the following entries:
Client name | Target Printer |
floor_1* | \\cps47\floor_11 |
floor_2* | \\cps47\floor_21 |
floor_3* | \\cps47\floor_31 |
As an alternative to the Client Name column, you can also use the IP Range column. Only printer shares are entered in the Target Printer column.
(The default entry in Client Name and IP Range is: *)
Client type
On the one hand you can select between the client platforms Windows (W), Mac OS X (A), Unix or Linux (L), Java (J), thin client (T) and other (x), and on the other hand between the connection protocols TCP/IP (T), RDP (R), ICA (I) and PCoIP (P); see also General. By default, all client types are selected. If specific translation rules are only to apply to selected client types, they are easily selected by simply adding or removing a checkmark. In the following table, as an example, the ThinPrint Output Gateway share is assigned to all Windows clients. All other client types use the HPLaser share, which uses a native printer driver.
W | A | L | J | T | x | T | R | I | P | Target Printer |
√ | – | – | – | – | – | √ | √ | √ | √ | \\cps47\ThinPrint Output Gateway |
– | √ | √ | √ | √ | √ | √ | √ | √ | √ | \\cps47\HPLaser |
Variables
To simplify printer administration, it is possible to use variables. Several printers can thus be mapped with one single entry where the variables are replaced by e. g. the printer name or the print server name of the printer in the ThinPrint Client respectively.
Variable | Meaning |
%LCPRN% (Local Client Printer) | printer name as shown in ThinPrint Client Manager |
%LCCLA% (Local Class) | class name, as shown in ThinPrint Client Manager |
%LHOST% (Local Host Name) | client machine’s host name (= client name) |
%LCLIP% (Local IP Address) | client machine’s IP address |
%LPSRV% (Local Print Server) | local print server’s name as shown in ThinPrint Client Manager (e. g. ps34) |
The entries are made in the Target Printer column in Dynamic Printer Matrix. Either variable can be used as desired, and they can also used in combination. Further examples can be found in AutoConnect in the remote desktop session.
Below are two examples of how entries in the Dynamic Printer Matrix can be simplified by using variables.
Example without local print servers
The main office has a terminal server or a VDI, plus a central print server with a Thin-Print Engine installed. The goal is to map the printers of the respective workstation (or terminal) in each user's session with only one entry in Dynamic Printer Matrix.
example scenario 1 for variables in Dynamic Printer Matrix
The individual printers of the Windows workstations are created according to ThinPrint naming conventions (in this example: TCP/IP) and shared on the central print server (cps47) in the main office, for example:
Printer name | Share name |
HP DeskJet#192.168.131.124:1 | HP DeskJet |
Lexmark T620#192.168.131.124:2 | Lexmark T620 |
Shared printers on the central print server
Only one entry is then necessary in Dynamic Printer Matrix, namely
\\cps47\%LCPRN%
where cps47 is the central print server:
Dynamic Printer Matrix on a terminal server: One line is sufficient (ideally) to map all printers of all workstations
In the user's session, the printers folder will then look like the following screenshot.
Printers connected to a variable in the session
Example with local print servers
The main office has a terminal server or a VDI, plus a central print server with the ThinPrint Engine. Each of the branch offices has a local print server installed, with the ThinPrint Client as a Windows service. The goal is to map the printers of the respective branch offices in the session of each user, using only one entry in Dynamic Printer Matrix.
example scenario 2 for the use of variables in Dynamic Printer Matrix
The printers of each branch office are created and shared on the local print servers (in this example: Berlin and Paris).
The individual printers of the various branch offices are created according to ThinPrint naming conventions (in this example: TCP/IP) and shared on the central print server (in this example: cps47) at the main office, for example:
Printer name | Share name |
Lexmark Optra#berlin:1 | Lexmark Optra_berlin |
HP Color#berlin:2 | HP Color_berlin |
Lexmark Optra#paris:1 | Lexmark Optra_paris |
Epson Stylus#paris:2 | Epson Stylus_paris |
The printer ID (:1, :2) is the ID, as used in the ThinPrint Client on the local print server. Berlin and Paris are the names of the local print servers. In this example, we are printing via TCP/IP. Only one entry is then necessary in Dynamic Printer Matrix, namely
\\cps47\%LCPRN%_%LPSRV%
where cps47 is the central print server:
Dynamic Printer Matrix: A single row is enough to map the printers of all the branch offices
The variable combination %LCPRN%_%LPSRV% is then translated based on the printer name in the ThinPrint Client of the user machine as follows: HP Color_berlin or Epson Stylus_paris. It thus exactly matches the share name on the central print server. Using this share, you can then print directly to the corresponding printer on the local print server: for example HP Color on the berlin print server.
The Printers folder is then displayed in the user’s session as shown in following illustration (example for Berlin).
printers created in the session with two variables
When you've done all changes then you need to acknowledge them.
By clicking Publish you acknowledge your changes and they will be saved in the given AutoConnect database (see Storage destination for AutoConnect settings) or by clicking Discard All no changes will be saved.
Map Additional Printers
In contrast to the Dynamic Printer Matrix, with Map Additional Printers you can map any network printer (share on a print server) – regardless of that ThinPrint Clients or a print server with a ThinPrint Engine installed on are available.
See Syntax: Map Additional Printers (below) when you want to use filter rules like IP ranges or AD groups.
Legend:
Input modes for search
The search box can be used in two ways:
- Direct search:
- Even when entering just one character, all matches are listed immediately. With every additional character, the number of matches decreases accordingly.
- Debug search:
- By using keywords, an AutoConnect query can be simulated. Here, the entries are not only compared to the entries in the table (as opposed to Direct Search), but the entries are evaluated.
- So, you can easily see the relevant rows for a specified client or user. This can be helpful for support purposes.
- When entering more than one key, use commas to separate.
- Keys: User, IP, Client
- If you enter a user name, also user groups in which the user is a member will be found.
- With IP addresses also IP ranges will be found in which the entered IP address is enclosed.
- If you enter words, items with wildcards will be found if the entered string and an item match.
- Checkbox search in columns <key>:true
Example for debug search:
User5 from the domain ourdomain.local establishes a session from Client7 with the IP address 192.168.14.10. To figure out the very rows used by AutoConnect, you could enter:
IP:192.168.14.10, Client:Client7, User:ourdomain\user5
When you've done all changes then you need to acknowledge them.
By clicking Publish you acknowledge your changes and they will be saved in the given AutoConnect database (see Storage destination for AutoConnect settings) or by clicking Discard All no changes will be saved.
Sending and importing the configuration
Similar to the port configuration, AutoConnect also has additional options of Send Configuration and Import from Management Services.
When sending, the AutoConnect configuration is sent to other computers with the exception of Dynamic Printer Matrix or Map Additional Printers tables – these are included in AutoConnect’s configuration database and can be assigned by setting the storage destination (see Storage destination for AutoConnect settings) or by copying the database file.
Using the import function, CSV files which come from Management Services can be read in (see above import from a CSV file).
Caution! With Send and Import, an existing AutoConnect configuration will be overwritten – with Import without warning!
Send configuration
The Action→ Send Configuration function lets data from the AutoConnect configuration be sent to groups of servers; see also Procedure when sending.
Once you are finished configuring AutoConnect, click Apply or OK.
Saving and importing the AutoConnect database
Saving the AutoConnect database can be done in two different ways. First of all you could save the database after changing something via Save Table As.
It can be done as an alternative via rightclicking the snap-in AutoConnect and choose Save Table As.
After specifying the location, the database is stored as a GZ file (zipped XML file, corresponds to the .DB2 format).
As well via rightclick on the snap-in AutoConnect you can choose Open Tables from and import a saved AutoConnect database. You can import the database on the same server you saved it or on a other server with a ThinPrint Engine installed.
Script control
If you want to run AutoConnect from the Command Prompt or using a script, the following parameters (amongst other) can be used:
Parameter | Function |
-v | (Verbose) Display messages; give detailed information at startup |
-d | Delete the printer(s) for a specific session |
-dl | Delete only local printers (on remote desktops) |
-dn | Delete only connections to printer shares |
-dsession-ID | Delete all printer(s) of a specific session (admins only). The session ID can be found in the printers folder under Location |
-d all | Delete all printers created with templates (admins only) |
-r | (Repair) Compares saved session information at actually existing printer objects (admins only) |
-f | shares the printer with the specified share name; possible placeholders: %N = printer name %A = printer address %I = client ID %U = user name |
-F x | Keep AutoConnect running and restart every x seconds |
-p port | (Port) TCP/IP port number (if other than port 4000) |
-iprotokoll | (Interconnection) Select protocol for connection to the ThinPrint Clients; overwrites AutoConnect dialog settings (acceptable values: TCPIP, VC, AUTO) |
-aadresse | Specification of IP address or client name of the computer on which a ThinPrint Client is running – i. e., of local print servers or external print servers of network printers (e. g., ThinPrint Hub or a device from SEH) |
-L | Display ThinPrint Client’s printer list |
-I printer ID | Specification of selected printer IDs from ThinPrint Client – comma separated |
-I d | Map only ThinPrint Client’s Current printer |
-? or -h | (Help) Will open parameter help panel |
Applying changes
Once you have finished configuring AutoConnect, click Apply or OK.
Syntax: Dynamic Printer Matrix
The table shows some examples how you can use the filtering techniques of the Dynamic Printer Matrix.
Column | Example |
IP Range/Group | •192.168.1.0/24 |
Client name | •HHPC01234 * placeholder for one or more characters |
Driver name | •HP Color Laserjet CP3505 * placeholder for one or more characters |
Printer name | HP Support CP33505 * placeholder for one or more characters |
User/Group | User:\\domain name\AD account name Example: \\ourdomain\jane.doe Tip: If you have just a simple domain without subdomains you can use only the account name of the user without specifying the domain name as well. Active Directory Group: \\domain name\group name Example: \\ourdomain\marketing Tip: You have to enter the domain name without suffix. Wrong: \\ourdomain.com\marketing |
Syntax: Map Additional Printers
The table shows some examples how you can use the filtering techniques of the Dynamic Printer Matrix.
Column | Example |
User/Group | User:\\domain name\AD account name e. g.: \\ourdomain\jane.doe Tip: If you have just a simple domain without subdomains you can use only the account name of the user without specifying the domain name as well. Active Directory Group: \\domain name\group name e. g.: \\ourdomain\marketing Tip: You have to enter the domain name without suffix. Wrong: \\ourdomain.com\marketing |
IP Range/Group | • 192.168.1.0/24 |
Client name | • HHPC01234 * placeholder for one or more characters |
MAC Address (This filter only works when you use VMware Horizon) | • XX-XX-XX-XX-XX-XX |
Disabling Windows printer mapping
To simplify the selection of a ThinPrint printer within a session, the Windows automatic printer mapping function should be disabled within and outside of the session. To do so, configure the following on the terminal server:
Windows Server 2012/2016
- On the terminal server, go to Administrative Tools, and open the Remote Desktop Services folder.
- Select Remote Desktop Gateway Manager
- Select Connection Authorization Policies
- Click on the policy RDG_CAP_AllUsers and go to the Device Redirection tab. Place a checkmark at Printers while selecting Disable device redirection for the following client device types.