Computer Hope

Microsoft => Microsoft Windows => Windows Vista and 7 => Topic started by: geoffl on November 23, 2012, 01:02:54 AM

Title: Do I have to have a default printer?
Post by: geoffl on November 23, 2012, 01:02:54 AM
Hi,
I have 2 programs on my computer and I want them to use different printers. Can I do this without going to the printer folder and changing the default printer?
Regards
Geoffl
Title: Re: Do I have to have a default printer?
Post by: jason2074 on November 23, 2012, 06:08:55 AM
You can go to Start, Devices and Printers and right-click the Printer to be used and set as default or try this http://www.addictivetips.com/windows-tips/change-default-printer-for-different-print-jobs/
Title: Re: Do I have to have a default printer?
Post by: soybean on November 23, 2012, 08:45:02 AM
Yes, you have to have a default printer.  But, you don't need to change the default printer when you want to use a different printer.  Just select the non-default printer you want to use from your print setup panel within the software you're using.  Or, get the third-party add-on utility that jason2074 posted; it allows setting different default printers for different printers, which is something Windows does not do.
Title: Re: Do I have to have a default printer?
Post by: geoffl on November 23, 2012, 10:34:00 PM
Thank you for that. I didn't think I wuld need another program. I thought maybe there was a command I could put in my programs opening bat file to do it. What command is sent when you click 'set as default printer'?
regards
Geoffl
Title: Re: Do I have to have a default printer?
Post by: quaxo on November 24, 2012, 08:40:00 PM
There is no way to effectively do this without a third-party program. The program recommended in that link (Automatic Printer Switcher) would be the best way to go. It remembers program/file specific settings so that it always prints to the correct printer depending on the file. A batch would only be effective if the program was launched from the batch file, and would need to be switched back for all other programs.

With Automatic Printer Switcher, there's no need to worry about switching it back, printing while multiple programs are open that use different printers, etc.
Title: Re: Do I have to have a default printer?
Post by: BC_Programmer on November 25, 2012, 02:47:22 AM
What command is sent when you click 'set as default printer'?
[/quote]

None. Setting the default printer sets the default printer for the current user on the local machine by calling SetDefaultPrinter() in winspool.drv. It is possible as well to set the default printer using a VBScript.

However, I think the idea you are approaching, which seems to suggest making a short script to change the default printer, run the program, and set it back, has a glaring flaw...

setting the default printer sets it for all applications. So if you run the program more than once, the default printer won't change back. And if you try to do it for multiple programs, you'll have almost no idea where you are really setting it, and the entire thing becomes a game of musical chairs as the printers are randomly shuffled as the default.


The above program does the job by hooking when other programs use the printer and changing the settings before printing. This would probably do what you like. There is the possible issue about what takes precedence when you change options on the printer setup dialog of an application, but for your use case it's capabilities seem to fit the bill.

Program-specific "default" printer settings are program specific. Some programs will allow you to choose a default for that program, others will not.
Title: Re: Do I have to have a default printer?
Post by: geoffl on November 26, 2012, 04:59:45 AM
Thank you all so much for your help. It is really appreciated.
Geoffl