Set a printer with a dos command

Hello,
We have a bat file that runs on a remote computer that creates a pdf file. The problem is that the printer has to be set on a specific printer to create this pdf. When other users log into this machine the default printer gets changed and our pdf does not work the next time. Is there a way to set a printer with a dos command so we can add it to the beginning of our bat file?
portillosjohnAsked:
Who is Participating?
 
WayneATaylorCommented:
Try the following command:

Just change printer name for the actual name"

RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "PRINTER NAME"

Wayne
0
 
portillosjohnAuthor Commented:
Nice and Quick!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.