Printer User Interface (PrintUIEntry)



I am trying to install a new network printer in our department and want to
script the installation for all clients. I have followed the instructions at
however the installation is unsuccessful. I recieve the following error
'Operation could not be completed. Cannot locate a suitable printer driver.
Contact your network administrator...'. Below are the detail and the syntax
I am using with the printui utility.

Printer Dell 5100cn
Driver location on local system: C:\testp
Command file name: pinstall.cmd
Contains of pinstall.cmd:
REM # Filename: pinstall.cmd
REM # Description: Installs the Dell 5100cn printer
REM # $Id$

REM # Make sure the ports are created - %PROGRAM_FOLDER% is defined by
REM # PKGADD while it is running. See the documentation for details.
regedit /s "C:\testp\5100cnreg.reg"

REM # Restart the spooler service
net stop spooler
net start spooler

REM # Install all of the printers via rundll32 - This could easily be put into
REM # a FOR loop but isn't here for readability
SET DRIVER=Dell 5100cn

REM # Remove existing printers with the same name so we don't get copy after
REM # NOTE: start /wait makes us wait for rundll32 to finish before continuing
start /wait rundll32 printui.dll,PrintUIEntry /dl /n "math231chp" /q
start /wait rundll32 printui.dll,PrintUIEntry /dl /n "math231chp-t" /q
start /wait rundll32 printui.dll,PrintUIEntry /dl /n "math231chp-g" /q

REM # Install the printers
start /wait rundll32 printui.dll,PrintUIEntry /if /b "LC Dell 5100cn" /f
"C:\testp\dlxcrzi.inf" /r "%SERVER%:Dell5100cn" /m "%DRIVER%" /z /u
REM # start /wait rundll32 printui.dll,PrintUIEntry /if /b "math231chp-t" /f
"%windir%\inf\ntprint.inf" /q /r "%SERVER%:math231chp-t" /m "%DRIVER%" /z /u
REM # start /wait rundll32 printui.dll,PrintUIEntry /if /b "math231chp-g" /f
"%windir%\inf\ntprint.inf" /q /r "%SERVER%:math231chp-g" /m "%DRIVER%" /z /u

This process generates the error noted above even thought the driver file is
Thanks in advance for any suggestions.


Thanks for the post Cari,
Unfortunately this article appears to be another method of installing a
printer (shared printer via UNC) and does not address driver installation. I
am looking to install an TCP/IP port based printer where the drivers are not
included in as part of the OS.

Thank you for your suggestion, but I'll have to keep looking.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question