|Hey all, |
I am currently working on a BATCH file that will install a specific printer (on a printserver) to a computer. The current script looks is this:...
REM this command file will add a network printer to a computer remotely
REM the parameters are:
REM 1 - the name of the computer to which the network printer is to be added
REM 2 - the UNC name of the printer to be added
REM for example, to add the printer called ThePrinter that is shared from the computer PrintServer
REM to the computer called TheClient:
REM key this command in a Command Prompt window:
REM addglobalprinterremotely theclient printserver\theprinter
REM add the specified printer to the specified computer
rundll32 printui.dll,PrintUIEntry /ga /c\\beit032 /n\\printserver\153_ca_hp2015
REM stop the print spooler on the specified computer and wait until the sc command finishes
start /wait sc \\beit032 stop spooler
REM start the print spooler on the specified computer and wait until the sc command finishes
start /wait sc \\beit032 start spooler
What I am after acheiveing is to be prompted for the following information..
1: PC Name (where the Printer will be installed - in the script as "\\beit032")
2: The printer. (in the script as "\\printserver\153_ca_hp2015")
I have tried a few methods but just cant get it to work.
Any help on this would be great.
Thanks in advance.