Cntdwn
(Just in Town)
2009-01-19 06:03 PM
Determine Default Print Server

To set default printers, I use the AddPrinterConnection/SetDefaultPrinter commands for the specific group or user. This creates the connection no problem, all is good.

What I want to do now though is actually determine if the primary print server is up. If not, automatically set the default printer to the secondary print server that is in standby.

basically

1. Check to see if PrtServe1 is up
2. IF it is up - set it as the default print server and map the printers
3. IF it is down - use PrtServe2 as the default and map the printers

We try to make as much as possible invisible to the user.

Is this possible with kix?

Thanks


Gargoyle
(MM club member)
2009-01-19 06:13 PM
Re: Determine Default Print Server

You could use the WMIService() to check for the spooler service state.

NTDOCAdministrator
(KiX Master)
2009-01-19 08:58 PM
Re: Determine Default Print Server

You could make it happen during logon but to have one work like that on the fly you would need to run KiXtart as a service or as a script that is always running and monitoring the Print Server. If you really have that much need then I think you need to spend more time working on fixing your Print Server.

We had 2 print servers at my old work that managed 400 printers each and they were rarely down. New place only serves about a dozen printers but both of those are always up as well. Make sure you're not using old print drivers that were not designed for the OS they're installed on as that can cause print spooler crashing.