/build/static/layout/Breadcrumb_cap_w.png

Trying to delete a network printer and add a new network printer on a new print server.

Our company has upgraded and made new print servers for each branch.  I am new to scripting and would like to ask how I can remove an old printer and add a new one.  I am currently looking to use a batch file.  I am currently have a script but would like to add the step to remove the old one.  I don't want to confuse the users while printing.  Below is my batch file.  Please let me know what I can do to make it work the best. I also am trying to not have the users not reboot to see the newly added printer.

 

REM Add printer
rundll32 printui.dll,PrintUIEntry /ga /n\\"Print Server Name"\"Printer Name"
md.exe /c start /wait ping 127.0.0.1 -n 10
cd c:\windows\system32
NET stop spooler
NET start spooler

 

 


1 Comment   [ + ] Show comment
  • Thanks, anyone have a script that has an IF THEN statements. If \\server1\Printer1 then run command line to delete that printer and install the new one \\Server\NY-print-01 - csmith1102 8 years ago

Answers (1)

Posted by: anonymous_9363 8 years ago
Red Belt
0
Seek out the rather nice print-related VBS scripts from Microsoft. Much more flexible than nasty old batch!

Google for 'prncnfg.vbs' - that should turn the whole set up.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ