top of page

Group

Public·2 members

Howto: Automaticly Install Printer And Printer Port


DOWNLOAD https://urlin.us/2tvrYi





Howto: Automatically Install Printer and Printer Port


If you want to install a printer and a printer port on your Windows computer without having to go through the manual steps, you can use a simple script that automates the process for you. This can save you time and hassle, especially if you have multiple printers to set up. In this article, we will show you how to create and run the script, and what you need to know before you start.


What You Need


Before you can use the script, you need to have the following:


A Windows computer with administrator privileges.


The printer driver files for the printer you want to install. You can download them from the printer manufacturer's website or use the CD that came with the printer.


The name of the printer port you want to create. This can be a standard port (such as LPT1 or COM1) or a custom port (such as IP_192.168.1.100).


The name of the printer you want to install. This can be any name you choose, but it should be unique and descriptive.


How to Create the Script


To create the script, you need to open a text editor (such as Notepad) and type the following commands:


@echo off


rem This script will automatically install a printer and a printer port on Windows


rem Change the values below according to your preferences


set PrinterDriver=HP LaserJet 1020


set PrinterPort=IP_192.168.1.100


set PrinterName=HP LaserJet 1020 Office


rem Do not change anything below this line


cscript %windir%\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r %PrinterPort% -h %PrinterPort%


rundll32 printui.dll,PrintUIEntry /if /b "%PrinterName%" /f "%dp0%PrinterDriver%\*.inf" /r "%PrinterPort%" /m "%PrinterDriver%"


pause


Save the file as install_printer.bat in the same folder where you have the printer driver files.


How to Run the Script


To run the script, you need to do the following:


Right-click on the install_printer.bat file and select Run as administrator.


Wait for the script to execute. You should see some messages on the screen indicating the progress of the installation.


When the script is done, press any key to close the window.


Check if the printer and the printer port are installed correctly. You can do this by going to Control Panel > Devices and Printers and looking for your printer name and port name.


Tips and Troubleshooting


Here are some tips and troubleshooting steps if you encounter any problems with the script:


If you get an error message saying that the printer driver is not compatible with your system, make sure that you have downloaded the correct driver for your Windows version and architecture (32-bit or 64-bit).


If you get an error message saying that the printer port already exists, make sure that you have entered a unique port name that is not used by any other device.


If you get an error message saying that the printer name already exists, make sure that you have entered a unique printer name that is not used by any other device.


If you want to install more than one printer and printer port using the script, you can create multiple copies of the install_printer.bat file and change the values of PrinterDriver, PrinterPort, and PrinterName accordingly.


If you want to uninstall a printer and a printer port that you have installed using the script, you can use another script that reverses the process. To create this script, open a text editor and type the following commands:


@echo off


rem This script will automatically uninstall a printer and a printer port on Windows


rem Change the values below according to your preferences


set PrinterDriver=HP LaserJet 1020


set PrinterPort=IP_192.168.1.100


set PrinterName=HP LaserJet 1020 Office


rem Do not change anything below this line


rundll32 print aa16f39245






About

Welcome to the group! You can connect with other members, ge...
Group Page: Groups_SingleGroup
bottom of page