Having trouble signing in? Try this!
Ask questions. Help others.
The HP Community is here for you.
Post new question
Note on archived topics.
This topic has been archived. Information and links in this thread may no longer be available or relevant.
If you have a question create a new topic by clicking here, or click on "Post new question" above and select the appropriate board.
Posts: 1
Member Since: ‎01-27-2014
Message 1 of 1 (876 Views)

How to disable HP Universal Printing dialog box

Hi, I am trying to install HP Universal Printing PCl 6 printers on a local machine using a batchfile from an application (C#) which automatically detects if a printer has been installed or not. The batchfile has the following entries:


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"


When I run my application, the printer is installed but when I try to print, sometimes I get the HP Universal Printing dialog asking me to select a printer. I can't even exit from this dialog. Other times when I dont get the printing dialog my print function fails with Invalid Handle exception.


The next time I try to print with the printer installed, it prints documents successfully.


How can I disable this print dialog using the batchfile above and why do I get the Invalid Handle expection on the first install and print??


0 Kudos
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation