Managing Printer Deployment Using Layers in the Unidesk Environment

Managing Printer Deployment Using Layers in the Unidesk Environment

book

Article ID: CTX221754

calendar_today

Updated On:

Description

While many brokering and persona management solutions provide mechanisms to manage printer deployment, you might find it easier to use Unidesk layers. Unidesk layers provide a flexible mechanism for managing printer deployments for different groups of users.

When you use Unidesk layers to deploy Windows printers, you need to take into account the differences between printers defined using local ports and those defined as network printers.  You must define them differently  when you use a Unidesk layer to deploy the printers.

This article describes how to different strategies you can use for printer deployment with Unidesk layers.

Printer deployment strategies

Small organizations should consider either of the following deployment strategies:

  • Define shared printers in an Operating System layer.
  • Define shared printers in a single Application layer.

Large organizations often use the following deployment strategies:

  • Define printers by location
  • Define printers by department
  • Define printers by application

Resolution

Deploying local printers

The main use for a local printer definition in a layer is for printers that use local IP ports to connect to printers over the network by IP address.

When you add a local printer, Windows stores the printer definition in the following Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers

When you create a Unidesk layer, the layer includes the changes you make to the HKEY_LOCAL_MACHINE\SYSTEM hive in the registry.  When you assign the layer to desktops, the deployed desktops receives the printer definition automatically.  No additional effort on your part is required!

Deploying network printers

Unlike local printers, Windows stores network printer definitions in the HKEY_CURRENT_USER\Printers \Connections key in the registry.  Unidesk layers do not include the HKCU hive when you create layers. To add a network printer definition to a layer, we need to use a script that runs when the user logs into the desktop.

  1. On the gold image (if you are planning to use an Operating System layer) or on the Installation Machine (if you are planning to use an Application layer), add the printers in the normal manner.
  2. Open the Registry editor.
  3. Navigate to the HKEY_CURRENT_USER\Printers key and find the Connections key for the printer
  4. Export the Connections key to a .reg file. The following illustration shows an example of an exported file named addacctprinter.reg
  5. Store the .reg file in a known location, for example: c:\windows.
  6. Create a cmd script similar to the following that imports the reg file that you created in the previous step:


    You can store the script in the same location as the exported .reg file.
    The script runs the first time the user logs in after you deploy the layer to the desktop. When the script runs, it imports the .reg file using the command regedit.exe /s and adds the printer definition to the user's HKCU hive in the registry.

    If you are creating a new layer, you can also include an appropriate icon for the printer, as shown in the following example:

  7. Create a layer or layer version and include the path to the script in the Script Path box, as shown in the following example:
  8. After creating the layer, assign it to the appropriate desktops. When a user logs in to the desktop for the first time, the script runs and adds the new printer definition to the registry.

Important Printer Layer Considerations

  • When using a script to define a printer, keep in mind that the script runs one time only the first time the user logs into the desktop after you apply the new layer.
  •  If multiple users share a single desktop, configure the script to run from a login script. This configuration ensures that the script runs for all users that log in to the desktop.
  • Add versions to layers when you want to update printer drivers or add new printers for this group.
  • If you assign multiple layers network printers for each desktop, ensure that the names of the exported registry files and the scripts are unique.
  • Install personal printers directly on the desktop. The printer definition becomes part of the Personalization layer for the desktop.