Printer Issue - automatically switches default printer.

To: Print Masters

An association we work with has a odd issue:

If you have a printer selected as your default printer and when you are in another program and select to use a different printer just for that time, then it switches your printer to the printer you only wanted to use that once.

I know this sounds like a riddle or something crazy, well it is! All I want to do is have a specific printer selected as default and STAY that way! please read example for better understanding:

Example: Lexmark Printer is selected as this persons default printer in windows. When they going into a program and select to use the HP LaserJet, it successufully prints the laser roster, however, in windows it's now switched the HP LaserJet printer to default.

This issue only occurs when they try to print the specific laser roster. Is they a way to LOCK a specific printer as default.

This is a annoyance for the fact they keep the black & white printer(faster) as default for majority of office work. The roster's are only run once a week or so.

Thanks in advance,

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


What app is used to print the laser roster?

I have an oooolllld app here at work that does that same thing.  It is very annoying and I have not found a way to disable the default printer switching.  I always just chalked it up to poor programming.

   Could that be application specific? You might want to check the setting on the application or check the website.


You dont understand.  The application has not been developed on in 10 years and will never be developed on again!  There is no option for default printer.  It will select your default printer by default but if you switch to a different printer and print, that printer will become your new default!
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Darrell PorterEnterprise Business Process ArchitectCommented:
This was a significant problem for many older Windows applications.  They assumed that since you were changing the printer to print the document, you wanted to change the default printer to the printer you just selected.

The easiest way to resolve this is to have a script that sets the default printer to the printer of choice, starts the application, waits for the application to exit and then resets the default printer to the desired default.

A users' default printer is defined at:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device

This type REG_SZ value has a default string value of PrinterName,winspool,LPT1:. When set for a network printer, the string value is \\ServerName\PrinterShare,Description,LPTn:. The description is not important so the string value can be expressed as \\ServerName\PrinterShare,,LPTn:.

Create a registry file of the printer you want the application to use by setting this printer to the default printer and saving out this registry key as ROSTER.REG.

Create a registry file of the normal printer by setting this printer to the default printer and saving out this registry key as NORMAL.REG.

Use the instructions at to get the code to wait for the application to finish executing before performing a regedit operation.

So the fundamental script structure will be

Regedit /s ROSTER.REG
Start application
Wait for application to finish
Regedit /s NORMAL.REG

Hope this helps,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

   How about use some freeware reside in the system tray so you can easier to reset back the default prionter?

knoxj81Author Commented:
I don't want to name the software, however; it's only from Roster reports, I can do any other print job in the program without it switching the default printer....

Walkabout, thank you for your suggestion, I will try that first chance I have.

Any other suggestions left me know...

Bernie SalvaggioIT ManagerCommented:
Following walkabout's advice, but instead of hacking the registry every time you want to run this program, there's a nifty little program called defprint that lets you change the default printer on Windows boxes and is very simple to use.

Alternatively, if you only run 2k/XP you can use one of the following lines, run from a .bat or .cmd file to change the default printer:
rundll32 printui.dll,PrintUIEntry /y /n "\\ServerName\ShareName"
rundll32 printui.dll,PrintUIEntry /y /n "PrinterName"

P.S. The above command is awesome on 2K/XP boxes, run "rundll32 printui.dll,PrintUIEntry /?" from the command line to see all the other stuff it can do.  Just remember that when using it to add/remove printers entirely, the print spooler needs to be restarted, on XP the lines to do that are "sc stop spooler" and "sc start spooler" where as in 2k it needs to be done manually, but you can run "services.msc" to bring up the services window from a command prompt.

If scripting the whole thing doesn't work, as in, running the roster program and then changing the default printer all from a script, you could just put the default printer changes in batch file and throw it on the user's desktop and have them double-click it when they close out of the roster program.

Great idea salvagbf!

In w2k you can add this to the batch to restart the spooler service

net stop spooler
net start spooler

Bernie SalvaggioIT ManagerCommented:
TMWSIY, awesome, I hadn't realised you could do that in 2k, thanks!
Darrell PorterEnterprise Business Process ArchitectCommented:
You guys should also check out the netsh command for other cool features (kinda unrelated printing)
knoxj81Author Commented:
Thanks for your help guys.
Did you end up going with the batch file?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.