The HP Community is here for you.
01-27-2014 05:57 AM
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??