re
pour ma part j'utilise la fonction rundll32 printui.dll,PrintUIEntry de XP. tu peux avoir toutes les commandes par rundll32 printui.dll,PrintUIEntry /?
Si tu arrives à caser ça dans InnoSetup ........
Exemple pour une LaserJet HP sur le port //
REM *** Installer la Laserjet *****************************************************************************************
rundll32 printui.dll,PrintUIEntry /if /b "LJII" /f %windir%\inf\ntprint.inf /r "lpt1:" /m "HP LaserJet Series II" /Z
REM *** Définir par défaut : ***************************************************************************************
rundll32 printui.dll,PrintUIEntry /y /n "4030"
REM *** Restart the spooler service ********************************************************************************
net stop spooler
net start spooler
Exemple pour une Epson Color en reseau sur 192.168.1.250 ( par exemple ) :
REM *** Création du port **********************************************
start /wait regedit.exe /s port.reg
REM *** Restart the spooler service **********************************
net stop spooler
net start spooler
REM *** Installation de l'imprimantes **********************************
rundll32 printui.dll,PrintUIEntry /if /b "Epson Stylus Color II Réseau" /f %windir%\inf\ntprint.inf /r "IP_192.168.1.250" /m "Epson Stylus COLOR ESC/P 2"
REM *** Restart the spooler service **********************************
net stop spooler
net start spooler
fichier port.reg de définition du port
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\Standard TCP/IP Port\Ports\IP_192.168.1.250]
"Protocol"=dword:00000001
"Version"=dword:00000001
"HostName"=""
"IPAddress"="192.168.1.250"
"HWAddress"=""
"PortNumber"=dword:000009c5
"SNMP Community"="public"
"SNMP Enabled"=dword:00000000
"SNMP Index"=dword:00000001
Modifié par tiobilout le 18/04/2008 17:32