Creating a printer with IP port automatically

samelamin
samelamin used Ask the Experts™
on
Dear all

I would like to set up a code to create 8 printers automatically with ip port 0.0.0.0

Hopefully at a press of a button

I know printUI allows you to add a printer but it doesnt create the port and when i add it with an IP 0.0.0.0 it comes up with an error

here is my code

rundll32 printui.dll,PrintUIEntry /if /b "Test Printer" /f %windir%\inf\ntprint.inf  /r "IP_000.000.00.000"  /m "AGFA-AccuSet v52.3"


any idea?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
0.0.0.0 is a 'reserved' IP address.  Normally your printer IP must be in the same block as your computers like computers = 192.168.1.xxx, then printer = 192.168.1.xxx.

Author

Commented:
well the printers are virtual printers, in essence they are just queues where print jobs are held. And i need to give it the 0.0.0.0 address
solved it thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial