Solved

Set a printer with a dos command

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

13 Experts available now in Live!

Get 1:1 Help Now