Adding HTTP Printer with Script in XP

Hello!

I am writing a script to add network printers on Windows XP. The script is for my school, and will make it easy to add printers managed by our CUPS print server.

This is what I have so far:


set /p room=What room number (ex. B230) is the printer located in?

rundll32 printui.dll,PrintUIEntry /in /n "http://172.16.28.25:631/printers/%room%" /m "MS Publisher Imagesetter"

echo Room %room% printer installed. Enjoy your new printer!


Here is a list of switches that can be used with RUNDLL32 PRINTUI.DLL,PrintUIEntry.
http://www.robvanderwoude.com/2kprintcontrol.php

I am not sure if my driver syntax is correct – all I know is that the script as a whole doesn't work.
None of the examples for using "printui.dll" use the URL format – that might be a problem, too.

I'm a big UNIX guy, and I'm getting wicked frustrated with Windows – please prove me wrong!

Thanks so much!
-Peter
3 answers Last reply
More about adding http printer script
  1. Here is exactly what I want done, but with a batch script and with the user's ability to change B230 to A102, etc.






    -Peter
  2. I, too, want to accomplish exactly that. Did you ever find a solution?
  3. Unfortunately, I never did find a solution.
    I'm 99% sure it could be done with PowerShell scripting, but learning PowerShell would be too big a time investment.

    I'm off to greener pastures is UNIX land!
Ask a new question

Read More

Configuration DLL Printers Windows XP