Preventing pop-ups during "batchprint"

I'm trying to write a lisp to automatically print a drawing to a multi-page PDF file.
Do you know how to suppress all the pop-up windows that typically show up during the command "batchprint"?