Skip navigation

JSI Tip 1615. Freeware utility sets the default printer from the command line or in a batch.


Download DEFPRINT.ZIP and unzip it.

DEFPRINT /P displays the installed printers. Example:

Found 2 printers

PrinterName: HP1600C
ServerName: (null)
PortName: LPT1:
DriverName: HP DeskJet 1600C
PrintProcessor: winprint
ShareName: HP1600C

PrinterName: \\JSI005\HP OfficeJet
ServerName: \\JSI005
PortName: LPT1:
DriverName: HP OfficeJet
PrintProcessor: winprint
ShareName: HPOffice
To set a default printer, type:

DEFPRINT /D <PrinterShare> or DEFPRINT /D <LOCAL PORT>. Examples:

DEFPRINT /D LPT1: displays:

Found 2 printers
Changing default printer... 
DEFPRINT /D HP1600C is equivalent, as HP1600C is local and is connected on LPT1:.

To set the default to the HP OfficeJet on the JSI005 Workstation:

DEFPRINT /D HPOffice

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish