Vbscript Install Network Printer Driver
First I was looking for a way to install printers by IP faster than the normal 'add a printer', 'add a local printer', 'create a new port' and that whole time-consuming process. There are several ways to do this, I chose to use Windows already installed printer commands and wrote scripts for each of the printers I was trying to install. I've noticed that most printer install scripts just map to shared printers on the network. This script creates an IP Port, installs the driver from an INF file and instal Install Network Printer - Script Center - Spiceworks.
Folks, Sorry I haven't contributed in a while, but I'm answering my own question here (from a post weeks ago), and I think others might find this useful. Adding a TCP/IP printer requires that you have the TCP/IP Port in place first. But there's no easy way to do that via script (that I have found, and I've looked hard). So the easiest way I have found is to set up the ports on your master PC first, then export the following registry branch: HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Control Print Monitors Standard TCP/IP Port Ports This registry branch contains all the details about your TCP/IP ports, so capture the entire branch and save it as a registry file.
Then, during your post-install script, add this: start /high /wait REGEDIT /S printers.reg (name the reg file whatever you like). Then, after the PC reboots (yes this is necessary), it will be ready to programmatically add network printers and attach them to your newly added TCP/IP ports. I am using a CMD file with the PrintUI command structure, which I'll explain in a moment. Here is an example file adding two printers. Harvest Moon Game Hp For Android Games. @echo off ECHO. ECHO Installing Network Printers.
ECHO Printer 1 - Canon ImageRUNNER C3200 Color Copier start /high /wait rundll32 printui.dll,PrintUIEntry /if /b 'ATL - Canon ImageRUNNER C3200' /f c: Drivers Printers C3200 P52KUSAL.inf /r 'IP_192.168.10.32' /m 'Canon iR C3200-C1 PCL5c' comment 'Copy Room' ECHO. @alhaddar, Well, just put the pieces in the right places.
What is the IP address you have assigned the printer? Where is the INF file? What is the exact name of the printer in the INF file?
And finally, what do you want to call it? First, set up the IP port on a PC (any PC) that has a connection to the printer, and do a manual install of the printer driver. Note the exact name of the model in the INF file - let's say it's 'HP LaserJet 2100 PCL6'. Go into Regedit and export the key I mentioned above, AFTER you set it up manually. Printer Driver Canon Mf5700 Series there. That.reg file should be imported during the install process, for instance, during the post-XP installation script (I use a CMD file). After it reboots, the new PC will be ready to accept the new IP printer, and you can run a second script below.