Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11849
  • Last Modified:

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,

Jorden
0
knoxj81
Asked:
knoxj81
  • 4
  • 2
  • 2
  • +2
3 Solutions
 
TMWSIYCommented:

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.
0
 
wesly_chenCommented:
Hi,

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

Wesly
0
 
TMWSIYCommented:
lol!!

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!
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
WalkaboutTiggerCommented:
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 http://www.thescarms.com/VBasic/WshRegWait.asp 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,

Walkabout
0
 
wesly_chenCommented:
Hi,

   How about use some freeware reside in the system tray so you can easier to reset back the default prionter?
http://www.freewareweb.com/cgi-bin/archive.cgi?ID=1588

Wesly
0
 
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...

0
 
salvagbfCommented:
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.

http://www.netadmintools.com/art194.html

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"
or
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.

-Bernie
0
 
TMWSIYCommented:
Great idea salvagbf!

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

net stop spooler
net start spooler

HTH
Christian
0
 
salvagbfCommented:
TMWSIY, awesome, I hadn't realised you could do that in 2k, thanks!
0
 
WalkaboutTiggerCommented:
You guys should also check out the netsh command for other cool features (kinda unrelated printing)
0
 
knoxj81Author Commented:
Thanks for your help guys.
0
 
TMWSIYCommented:
Did you end up going with the batch file?
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now