Solved

Set a printer with a dos command

Posted on 2014-03-17
2
299 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Edureka is one of the fastest growing and most effective online learning sites.  We are here to help you succeed.

911 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now