Adding a printer automatically
Posted on 2003-11-07
I am trying to write an application that, given an inf file, driver, and necessary info, would install the driver and add a printer automatically to any windows system without going through the Add Printer Wizard and without any user intervention. I have scoured the web for any applications, scripts or windows commands that could do this but have found nothing. I am able to do this in Windows XP/2k by using the shell command:
rundll32 printui.dll,PrintUIEntry /if /b "VirtualPrinter" /f ".\lj456p5.inf" /q /r "FILE:" /m "HP Laserjet 5" /z /u
but it wont work in NT, 95, and 98.
I mostly program in VB, VB.NET and Java, but if anyone knows a way to do this please let me know.