Part of my job is installing printers for users. Now, I could just go on mapping the printserver and finding the printer from there, but that takes a lot of time, as we have some 100 plus printers per printserver. Instead, I spent an hour creating batch scripts, and have since used them to install printers.
The command we need is an extension of the rundll32
command. The basic command is this: rundll32 printui.dll,PrintUIEntry
. Now, just this will not really help you. You need to define some switches and operators. First off, you might want to know what switches and operators are available to you. To find them, simply open the “run” dialog box, and enter the command rundll32 printui.dll,PrintUIEntry /?
. This will yield an information box looking something like this:
The command I usually use looks something like this:
rundll32 printui.dll,PrintUIEntry /in /q /n "\\PRINTSERVER\PRINTER"
The switches I use are:
/in
– Adds a network printer connection
/q
– Runs in quiet mode
/n
– Defines what printer to add
There are many possibilities with this script, and I have never seen it fail.
Installing printers using a batch script
by
Tags:
Comments
2 responses to “Installing printers using a batch script”
-
In our company we deploy printers as well as map drives and configure many other users settings with a desktop management system called desktop authority.
As a good logon script replacement this solution offers a lot for configuring most key areas involved in desktop configuration like outlook profiles, power management settings, software depoyment, usb security, registry settings and many more.
-
Thank you Thomas, that looks very interesting.
By posting a comment, you consent to our collecting the information you enter. See privacy policy for more information.