/build/static/layout/Breadcrumb_cap_w.png

Printer Script Executes with Success. However, printer is not added.

I am executing the following script to delete and re-add a printer with a new ip address.  I am pushing this with an domain administrator account.   I am receiving success from Kace as I only have it setting off the VBS that I upload (I'm not putting this in case manually as I couldn't get it to work).  However, the printer is not re-adding with all users.  Thoughts on how to figure out who is getting it and who isn't without going through it manually.  Also, I have this same script running for two other printers with no issues.

' Remove printers

Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2")

Set colPrinters = objWMIService.ExecQuery("SELECT * FROM Win32_Printer WHERE Name = 'Canon iR-ADV C5550/5560 UFR II'")

For Each objPrinter in colPrinters

    objPrinter.Delete_

Next


Set colPrinters = objWMIService.ExecQuery("SELECT * FROM Win32_Printer WHERE Name = 'RICOH MP C6003'")

For Each objPrinter in colPrinters

    objPrinter.Delete_

Next


Set colPrinters = objWMIService.ExecQuery("SELECT * FROM Win32_Printer WHERE Name = 'H-Copier'")

For Each objPrinter in colPrinters

    objPrinter.Delete_

Next


' Add printer driver

Set objShell = CreateObject("WScript.Shell")

objShell.Run "cscript ""C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\210\prndrvr.vbs"" -a -m ""RICOH MP C6003 PCL 5c"" -i ""\\ulmfile\it\Installs\Drivers\printers\HoustonPrinter\Ricoh Copier - z73961en\disk1\OEMSETUP.INF""", 0, True



' Add printer ports

objShell.Run "cscript ""C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\210\Prnport.vbs"" -a -r 10.201.51.x -h 10.201.51.x -o raw -n 9100", 0, True



' Add printers

objShell.Run "cscript ""C:\ProgramData\Quest\KACE\kbots_cache\packages\kbots\210\Prnmngr.vbs"" -a -p ""H-Printer"" -m ""HP Universal Printing PCL 6"" -r ""10.201.51.153""", 0, True



WScript.Quit



0 Comments   [ + ] Show comments

Answers (1)

Posted by: mlands 6 months ago
Senior White Belt
0

Found the issue, I was still referencing "HP Universal Printing PCL 6" when trying to add Ricoh... ID10T moment.. 

 
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