Installation d'une imprimante Zebra

Installation à réaliser par le service IT.

Installation du service d’impression #

Installer :

Télécharger https://erp.prod.protoelectronique.com/assets/PrintHandlerService.zip Mettre le dossier PrintHandlerService à la racine.

Lancer un prompt Powershell en Administrateur. Exécuter les commandes suivantes. Un mot de passe à créer sera demandé plusieurs fois. Il n’est utile que pour la procédure.

cd C:\PrintHandlerService\
Import-PfxCertificate -FilePath "localhost.pfx" -CertStoreLocation "Cert:\LocalMachine\Root"

New-LocalUser -Name PrintHandlerService
$acl = Get-Acl "C:\PrintHandlerService"
$ComputerName = $env:COMPUTERNAME
$UserName = "$ComputerName\PrintHandlerService"
$aclRuleArgs = $UserName, "Read,Write,ReadAndExecute", "ContainerInherit,ObjectInherit", "None", "Allow"
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($aclRuleArgs)

$acl.SetAccessRule($accessRule)

$acl | Set-Acl "C:\PrintHandlerService"

New-Service -Name PrintHandlerService -BinaryPathName "C:\PrintHandlerService\PrintHandler.Api.exe --contentRoot C:\PrintHandlerService" -Credential $UserName -Description "PrintHandlerService" -DisplayName "PrintHandlerService" -StartupType Automatic

Exécuter

.\PrintHandler.Api.exe

Il peut y manquer des dépendances .NET qui seront proposées au téléchargement. Si l’application se lance correctement, fermer Powershell.

Ouvrir le gestionnaire de service Windows puis démarrer le service PrintHandlerService. Si Windows affiche une erreur concernant l’ouverture de la session : Faire Clic Droit => Propriétés => Connexion et cocher “Compte système local” . Valider Re faire Clic Droit => Propriétés => Connexion et choisir cette fois-ci le compte PrintHandlerService avec le mot de passe créé.

Choix des imprimantes #

Exécuter C:/PrintHandlerService/PrintServerAdmin.exe Choisir pour chaque imprimante quel type de ZPL ou de PDF associer. Il faut parfois double-cliquer sur les cases à cocher pour qu’elles fonctionnent.