I'm trying to make a batch file that will be used to add network printers to computers at my work. The batch file will be run locally by an IT assistant on the computer that needs the printer added. The computers are running Windows 10.
We have two print servers, and a printer name that is specified might be on either print server. The aim is to simply try to add the printer from both servers. The correct one will succeed, the incorrect one will fail.
rundll32 printui.dll,PrintUIEntry for this. A snippet of my code is below.
rundll32 printui.dll,PrintUIEntry /in /n\\PRINTSERVER1\%printername% /q rundll32 printui.dll,PrintUIEntry /in /n\\PRINTSERVER2\%printername% /q
From what I can tell, the
/q switch should suppress error messages, such as this one:
However, I still see the error message show up when the script is run. Does anyone know how to suppress this warning?