martes, 27 de septiembre de 2011

Instalar Impresora con BAT

Hola a todos,
Estoy intentando crear un script que me permita crear colas de impresión de manera desatendida. de momento he mantenido las opciones iniciales para ir viendo cómo se ejecuta, porque no consigo que se instale el driver universal de HP.

@echo off
echo ======================================
echo PRINTER INSTALLATION
echo ======================================
echo.
echo.
set /p _ip=Enter printer IP:
cls
echo ======================================
echo SELECT PRINTER TYPE
echo ======================================
echo.
echo 1. HP UPD Queue.
echo.
echo x. Exit
echo.
set /p _sel=Enter number:
if "%_sel%" == "1" call goto HPUPD
if "%_sel%" == "x" call goto END
exit
:HPUPD
cd c:\WINDOWS\System32
cscript Prndrvr.vbs -a -m "HP Universal Printing PCL 5 (v5.3)" -v 3 -e "Windows NT x86" -i "C:\Archivos de programa\PrintDrivers\HP\UPD\53110527\WS2003x32\PCL5\hpbuio20l.inf"
pause
cscript prnport.vbs -a -r IP_"%_ip%" -h "%_ip%" -o RAW -n 9100
pause
cscript prnmngr.vbs -a -p "HPUPD" -m "HP Universal Printing PCL 5" -r IP_"%_ip%"
pause
cscript prnmngr.vbs -t -p "HPUPD"
exit
:END
exit

Si se os ocurre por qué puede estar dando error la instalación del driver avisadme, por favor.

Edito la entrada:

De esta manera se pueden instalar las colas de impresión por linea de comandos:

rundll32 printui.dll,PrintUIEntry /if /b "TESTPRINTER" /f "E:\RutaAlFicheroInf\hpcu115b.inf" /r "IP_X.X.X.X" /m "HP Universal Printing PCL 5 (v5.3)" /Y /u /Z

Un saludo,

Antonio Gayo

viernes, 23 de septiembre de 2011

CP Run Commands

Run Control Panel Items From Run Command

Control Panel Item // Command
Accessibility Options // Access.cpl
Add Hardware // Hdwwiz.cpl
Add/Remove Programs // Appwiz.cpl
Administrative tools // Control admin tools
Automatic Updates // Wuaucpl.cpl
Date and time // Timedate.cpl
Display // Control desktop / desk.cpl
Folder Options // Control folders
Fonts // Control fonts / fonts
Game Controllers // Joy.cpl
Internet Options // Inetcpl.cpl
Keyboard // Control keyboard
Mouse // Control mouse
Network Connections // Control netconnections
Network Setup Wizard // Netsetup.cpl
Open Control Panel // Control
Phone And Modem Options // Telephon.cpl
Power Options // Powercfg.cpl
Printers and Faxes // Control printers
Regional and Language // Options Intl.cpl
Scanners and Cameras // Sticpl.cpl
Scheduled Tasks // Control schdtasks
Security Center // Wscui.cpl
Sounds and Audio Devices // Mmsys.cpl
System // Sysdm.cpl
User Accounts // Nusrmgr.cpl
Windows Firewall // Firewall.cpl

Downloaded From:
http://www.technize.com/2009/03/27/run-control-panel-items-from-run-command/