Quantcast
Channel: Print/Fax forum
Viewing all articles
Browse latest Browse all 1188

Using PrintUIEntry to install driver for and add a HP 6 printer

$
0
0

Hi, I am trying to install driver and add a HP 6 printer using the following code run in a batch file.

set IP=IP_%1
pushd "%windir%\System32\Printing_Admin_Scripts\en-US\
Cscript Prnport.vbs -a -r IP -h %1
rundll32 printui.dll,PrintUIEntry /ia /m "HP Universal Printing PCl 6" /h "x64" /v "Type 3" /f %windir%\inf\ntprint.inf /u
rundll32 printui.dll,PrintUIEntry /if /b %1 /f "%windir%\inf\ntprint.inf" /r IP /m "HP Universal Printing PCl 6"

The problem I'm trying to solve is to install this printer silently on the server when a request comes in to print on that printer. I do some checking before to make sure its not already installed.

The problem I'm running into is that I sometimes get the HP Universal Printing dialog appear when I run this other times its works fine and installs the printer and prints the document. The times when it fails because this dialog appears is causing some problems as this needs to run on the server.

Any help much appreciated!!


Viewing all articles
Browse latest Browse all 1188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>