- Presence Tech
Script d'installation des imprimantes
:: Définition des variables
:: Important : Le nom de l'imprimante doit être le même que dans le fichier INF
:: La variable Port désigne le port RAW par défaut du port TCP/IP (ex : Lexmark 9100)
:: Pour le connaitre installer l'imprimante manuellement et regarder le port RAW utilisé dans les paramètres du port TCP/IP
set AdresseIP=10.1.81.1
set Imprimante=HP Universal Printing PCL 6
set Pilote=\\SERVEUR01\Winappli\Pilote HP\32 Bits\hpcu225c.inf
set Port=9100
set NomImprimante=HP Salle Info1
:: Création du port TCP/IP
cscript C:\Windows\System32\Printing_Admin_Scripts\fr-FR\prnport.vbs -a -r IP_%AdresseIP% -h %AdresseIP% -o raw -n %port%
:: Installation de l'imprimante (ajouter /y pour imp par defaut.)
rundll32 printui.dll, PrintUIEntry /y /if /b "%NomImprimante%" /f "%Pilote%" /r "IP_%AdresseIP%" /m "%Imprimante%"
rundll32 printui.dll, PrintUIEntry /k /n "%NomImprimante%"
rundll32 printui.dll, PrintUIEntry /y /n "%NomImprimante%"