Szerkesztés

Megosztás a következőn keresztül:


Print support app association

Follow the guidance in this article to set up and associate a print support app with a printer.

Important

Starting with the release of Windows 11 SDK (22000.1), Print Support Apps (PSA) are the recommended method of developing UWP apps for printers. To develop a Print Support App for your print device, download and install the Windows 11 SDK (22000.1).

This article discusses the following tasks:

  • Find a Hardware ID or a Compatible ID for your printer

  • Prepare a psa.inf extension INF file

  • Install the psa.inf extension INF file on a Windows 11 PC

  • PSA association override for enterprise and business customers

  • Use PSA with Universal Print

Set up printers and find the Hardware ID or Compatible ID

A print support app (PSA) is associated with a printer queue, using a Hardware ID or a Compatible ID.

To find the Hardware ID and Compatible ID for your printer, follow these steps:

  1. Connect the IPP printer to the Windows 11 PC.

  2. In the Windows 11 Settings app, select Bluetooth & devices.

  3. On the Bluetooth & devices page, select Printers & scanners.

  4. Select the IPP printer.

  5. On the IPP printer page, select Hardware properties.

  6. In the printer hardware properties dialog, select the Settings tab.

  7. Select Devices and Printers Folder.

  8. Right-click on the IPP printer and select Properties from the context menu.

  9. On the Hardware tab, select Microsoft IPP Class Driver in the list of Device Functions and then select the Properties button.

  10. In the Microsoft IPP Class Driver Properties dialog, select the Details tab.

  11. In the Property drop-down list, select Hardware Ids (or Compatible ID).

  12. Copy the Hardware ID string (it starts with "PSA_") in the Value list. You need this for extension INF, or alternatively, the Compatible ID (which doesn't start with "PSA_").

Prepare the PSA extension INF file

A PSA is associated with a printer by using an extension INF file.

The following steps create and test an extension INF file:

  1. Copy the psa.inf sample extension INF shown below as a starting point for your INF file.

  2. Update PrinterHardwareId in psa.inf file with your Hardware ID or Compatible ID.

  3. Update the PackageFamilyName and AUMID (AppUserModeId) for your PSA application.

  4. Create a catalog file.

  5. Sign the psa.cat file sample extension INF.

psa.inf sample extension INF file

[Version]
Signature = "$WINDOWS NT$"
Class = Extension
ClassGuid = {e2f84ce7-8efa-411c-aa69-97454ca4cb57}
Provider = %ManufacturerName%
ExtensionId = {D4D9196A-105B-4B76-B693-84BD33A7A703}
CatalogFile = psa.cat
DriverVer = 05/19/2020,16.35.13.542
PnpLockdown = 1

[Manufacturer]
%ManufacturerName% = Microsoft, NTamd64.6.3

[Microsoft.NTamd64.6.3]
%Device.ExtensionDesc% = PSA-Install, %PrinterHardwareId%
%Device.ExtensionDesc% = PSA-Install, %PrinterHardwareId2%
%Device.ExtensionDesc% = PSA-Install, %PrinterHardwareId3%

[PSA-Install.NT]
AddProperty = Add-PSA-Property

[PSA-Install.NT.Software]
AddSoftware = %SoftwareName%,, Microsoft-PSA-SoftwareInstall

[Microsoft-PSA-SoftwareInstall]
SoftwareType = %MicrosoftStoreType%
SoftwareID = pfn://%PackageFamilyName%

[Add-PSA-Property]
{A925764B-88E0-426D-AFC5-B39768BE59EB}, 1, 0x12,, %AUMID%

[Strings]
ManufacturerName = "Microsoft"
SoftwareName = "Microsoft Print Support App"
Device.ExtensionDesc = "Print Support App Extension"
MicrosoftStoreType = 2
PackageFamilyName = "dd5de805-d9bb-4785-88e9-399cbff2130e_ph1m9x8skttmg"
AUMID = "dd5de805-d9bb-4785-88e9-399cbff2130e_ph1m9x8skttmg!App"
PrinterHardwareId = "PSA_CanoniP110_seriesD84F"
PrinterHardwareId2 = "PSA_XeroxAltaLink_B8055C036"
PrinterHardwareId3 = "PSA_BrotherMFC-J775DWF678"

Test install extension INF on Windows 11

  1. Import your root certificate to the trusted store, if you used a self-signed certificate to sign the .cat file.

  2. Open an elevated command prompt and run the following command:

    pnputil.exe /add-driver psa.inf
    

PSA association override for enterprise and business customers

For consumer and home users, PSA is downloaded from the Microsoft Store and installed based on the printer's hardware ID or compatible ID. This feature is supported for enterprise and business customers as well, if they choose to use the PSA from their printer manufacturer. Association is controlled by the extension INF published on Windows Update by printer manufacturers.

Enterprise and business customers may need to override extension INF association, if they choose to use a business logic PSA (for example, a line of business app). They need to deploy and associate a custom PSA that has built-in business logic. Examples of the business logic are managing print quota and cost, or print policy (no color or no single side printing).

A registry key can be used to override a PSA association from an extension INF. This registry key method can be used for enterprise customers with Windows Print Server (Point and Print) and Universal Print.

Here's a ranking of how PSA is associated:

  1. Printer manufacturers' custom v3/v4 driver is downloaded from Windows Update (no PSA is used)

  2. Registry key is used to associate PSA

  3. Extension INF is used to associate PSA

  4. IPP printing without PSA

We recommend that enterprise customers use Microsoft Endpoint Manager to distribute the registry key. They can use Endpoint Manager to deploy a custom PSA as well.

The registry key is defined as follows:

Key item Value
Registry key path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\PSA\Association
Name Hardware ID or Compatible ID
Type REG_SZ
Value PSA AUMID, for example, "dd5de805-d9bb-4785-88e9-399cbff2130e_ph1m9x8skttmg!App"

The PSA key in Registry Editor:

P S A key in registry editor

The Value name and Value data in the Edit Multi-String dialog:

P S A key in edit multi string dialog

Using PSA with Universal Print

You can associate PSA with printers that natively support Universal Print.

Important

Printers using Universal Print Connector are not supported by Microsoft for use with PSA. However, in some instances, printers using Universal Print Connector may be supported by the original equipment manufacturer ("OEM") that provides the PSA and printer hardware. Please check with your OEM. The OEM, and not Microsoft, will be responsible for issues related to this OEM enablement and support.

You can find the Hardware ID of a Universal Print printer in the Windows 11 Settings app, similar to a local IPP printer:

  1. In the Windows 11 Settings app, select Bluetooth & devices.

  2. On the Bluetooth & devices page, select Printers & scanners.

  3. Select the Universal Print printer.

  4. On the Universal Print printer page, select Hardware properties.

  5. In the printer hardware properties dialog, select the Settings tab.

  6. Select Devices and Printers Folder.

  7. Right-click on your printer and select Properties from the context menu.

  8. On the Hardware tab, select Universal Print Class Driver in the list of Device Functions and then select the Properties button.

  9. In the properties dialog, select the Details tab.

  10. In the Property drop-down list, select Hardware Ids.

The Hardware ID is the printer-device-id IPP attribute from the printer.

printer device id I P P attribute from the printer properties dialog

Print support app design guide

Windows.Devices.Printers

Windows.Graphics.Printing.PrintSupport

Windows.Graphics.Printing.Workflow

Internet Printing Protocol (IPP) specification