Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote Printer Installation

Status
Not open for further replies.

psychonaut2000

Technical User
May 8, 2003
61
US
Here's what I've done so far:

1. created the following CMD file and called it ALLPRINT:

rundll32 printui.dll,PrintUIEntry /ga /c\\%1 /n\\%2
start /wait sc \\%1 stop spooler
start /wait sc \\%1 start spooler

2. created a CMD file for each printer install as follows:

ALLPRINT (workstation-name) (PrintServer)\(PrinterName)

QUESTIONS:

-If I have a list of all our workstation names how can I write a batch file that will plug them into number 2 above so that the printers in question will be installed to all the workstations in my list?

-How do I edit this line:

rundll32 printui.dll,PrintUIEntry /ga /c\\%1 /n\\%2

...so that no workstation name is required and the printer will be automatically installed on the workstation from which the command is run?
 
Excellent! Thank you very much! A couple more questions:

- What can I include in the batch file to remove all installed printers. We're upgrading users to new printers so I'd like to have the batch file first remove all currently installed printers and then install those of my choosing.

- A general batch programming question here...how do I create a pause in a batch programs execution. If I want, for example, a 30 second delay between completion of one line of code and execution of the next line how can I do this?

Thx again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top