for /f %%a in (C:\Scripts\CalledScripts\CompOnly.CSV) do ( @echo Creating Printer Port on %%a cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\prnport.vbs" -a -s %%a -r "Printerhostname" -h hostname -o raw -n 9100 cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\Prndrvr.vbs" -a -m "HP Universal Printing PCL 6" -h "sccm\hp drivers\hpcu230u.inf" -s %%a @echo Setting Printer on %%a cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -a -p "Printer Queue Name" -m "HP Universal Printing PCL 6" -r "Printerhostname" -s %%a )
Of Course the Queue should not exist before you create it...
With that said, the error you get is not the printer did not install, the issue is that it tied to a queue that does not exist.
Deals with getting drivers from the system sharing the printer.
On the second, add a TCP/ip port with ip if the printer, and then bind the printer to the new TCP/ip port.
Which printer make?
Main issue is whether the printer in question has drivers included in Windows.
If it is an HP as an example whose drivers are included in the OS.
You could look at powershell, vbscript net use to create the printer by correctly pointing at the driver..