NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Ruby | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | ERP | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | GNU/Linux Reference OS Build | MCJ How-to | MCJ Presentation Config | Keywords | RSS



Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Ruby
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·ERP
·REALbasic
·All Categories


Change Default Printer on Windows Using Defprint
Topic:Desktop   Date: 2003-01-20
Printer Friendly: Print

spacerspacer
<<  <   >  >>

Subject

If you wish to change the default printer on a users Windows box via a script, defprint is what you need. Stuart Anderson wrote this fine piece of freeware; however, the site referenced in the file is not available. We put a copy up on NetAdminTools here. Use defprint /P to list your printers:

C:>defprint /P
Found 4 printers
PrinterName: mondohplaser
ServerName: (null)
PortName: mondohplaser
DriverName: HP LaserJet 1200 Series PCL
PrintProcessor: WinPrint
ShareName: (null)
PrinterName: hpdj
ServerName: (null)
PortName: LPT1:
DriverName: HP DeskJet 672C
PrintProcessor: WinPrint
ShareName: (null)
PrinterName: Generic / Text Only
ServerName: (null)
PortName: FILE:
DriverName: Generic / Text Only
PrintProcessor: WinPrint
ShareName: (null)
PrinterName: Fax
ServerName: (null)
PortName: SHRFAX:
DriverName: Microsoft Shared Fax Driver
PrintProcessor: WinPrint
ShareName: (null)
C:>

Use defprint /D to set the default printer:

C:>defprint /D mondohplaser
Found 4 printers
Changing default printer...
C:>defprint /D LPT1:
Found 4 printers
Changing default printer...
C:>

We tested this on XP, and since this utility was written back in '98, we'd guess it will work on a wide variety of systems. One application that this is good for is if a rogue app changes the default printer. Just change the way the user starts the rogue app by using a batch file with the last line as a defprint command that switches the default printer back. Likewise, if certain applications should print by default to, say, a check printer, you could use the same technique, only put a line in the beginning and the end of the batch file.


People:
Places:
Things:
Times:





Please read our Terms of Use and our Privacy Policy
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2010 NetAdminTools.com