Solved

Set a printer with a dos command

Posted on 2014-03-17
2
300 Views
Last Modified: 2014-03-18
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?
0
Comment
Question by:portillosjohn
2 Comments
 
LVL 10

Accepted Solution

by:
WayneATaylor earned 500 total points
ID: 39935394
Try the following command:

Just change printer name for the actual name"

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

Wayne
0
 

Author Closing Comment

by:portillosjohn
ID: 39937056
Nice and Quick!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question