Quote

Two customers using 6.4 have reported that the printer is not defaulting as expected. I saw one of them do it so it does happen.

The customer was in apex but if was pointing to PDFX. They printed to their laser printer. Then they called up the print again and it was pointing to PDFX.

The other customer reports that she ALWAYS prints to her default printer. But it keeps reverting to somebody else's printer that she doesn't use. I believe her.

So is there anything you can think of that might cause this.

PS: Is it possible to add or is there already a switch that says to always go to their Default printer?
Unfortunately the rules for defaulting are somewhat complex, although as with most complexities in A-Shell, they arose due to the inherent complexities related to the environment and usage patterns.

The general rule is to default to whatever you last used for this kind of print request. But there is some fuzziness there in what we could mean by this. Prompting or not prompting? A-Shell or APEX? Or any kind of print request (Word?) from this workstation? Or this login?

The standard scheme is for A-Shell to keep its defaults separate from the rest of the applications, and each user's defaults separate from other users, but there are still multiple scenarios: prompt vs no-prompt. Each of those potentially has it's own default. They are stored in the user registry under HKCU\Software\MicroSabio\A-Shell\ASHW32 for A-Shell/Windows, and under HKCU\Software\MicroSabio\JBCT\ATE\Hosts\ for ATE. For example, here's my local A-Shell stored settings, which shows both the PROMPTprinter and the PVprinter (PV=PreView, i.e. APEX) as PDF-XChange 3.0

[Linked Image]

So the idea is if you are printing to the PROMPT printer and using APEX first, then APEX should default to the PVprinter. If you bypass APEX and go directly to the printer dialog, it should default to the printer last selected in that dialog, which is stored in the PROMPTprinter setting.

In almost every case, the two printer defaults will be the same. I can't even remember now the scenario where they could be different, but there must have been one making it worth the trouble.

The only way I can see that a user's APEX default would change to someone else's printer would be if somehow they were sharing the same registry. That would be next to impossible with P2P A-Shell, but in the case of ATE, it is possible to save your configuration globally rather than tied to the current user. (The option appears when creating a configuration, and displays on the ID tab of the ATE Connection Properties dialog.)

There is also an option to use the current Windows default, independent of the A-Shell or APEX default as described in the Printer Configuration > Init File > DEVICE > DEVICE=PROMPT topic ...

Quote

Beginning with A-Shell 6.1.1342 of March 2013, the Windows default printer may be specified with the DEVICE statement:

DEVICE=PROMPT(DEFAULT)

This is identical to PROMPT:, except that it ignores the last used printer and instead defaults to the system default printer. This is useful in places where printers come and go, and defaulting to the last used printer can cause confusion or worse when the last used printer is no longer present.
So when you say you want to "always go to their Default printer", there are two or three variations of what that could mean. For most people, what they mean by "default" is the last printer they used for THIS application. So if they used the printer dialog within APEX to select PDFX, then later printed to APEX and from there to the printer without going to the selection dialog, they would want it to go to PDFX again. But if in between those two events, they brought up Word, and printed to the Brother printer, that might have changed the Windows default (that's Word's prerogative). So in that case, which default would they want on their next A-Shell/APEX report? PDFX or Brother?

Note that any Windows app can change the user's Windows default printer, so the only way for an app to preserve its own default that can't be changed by other apps is for it to save that default in its own place (which is what A-Shell and APEX do). But you can have it either way.

Forensic debugging, unfortunately, is hard because of the myriad possible routes and sequences of events. But the basic tools are:

1) REGEDIT to look at the currently saved defaults (as in the image above)

2) The LP trace.

To illustrate the latter, if I execute this print command...

.PRINT SYS:ERSATZ.INI/PREVIEW

The trace starts out with...
Code
    Printer init file not found, try treating as DEVICE= name
    4 09:33:59 <PRINT:3371> GetDefaultPrinter0 (from last-used in registry): PDF-XChange 3.0
    Printer found
    16 09:33:59 <PRINT:3371> Retrieving handle to printer [PDF-XCHANGE 3.0] (for copies/orientation)...
Note that the printer name also appears in the APEX title bar.

If I am able to get to the printer selection dialog (either because it's APEX, or because the target printer was PROMPT:), then I can change it, which will then change one or both of the A-Shell saved defaults (but will never change the Windows default).

Hopefully we can work from the general description/framework to the the specific of what is really going on at these user sites.

Note though that since we are dealing with registry settings, it may be critical to know the details of the environment that affect the registry and specifically the possibility of the registry settings being shared between multiple users. In other words, do the users have independent logins? Independent workstations? Is it a Domain or a workgroup? P2P, ATE, RDP? etc.