Questions about how ATE creates the list of available printers surface from time to time and the details have evolved with newer versions of Windows and ATE. There was an earlier discussion on the thread Network Printers, but it's time to revisit it with this latest query:
Quote

Is there a way to refresh the printer list in ATE? This customer's IT company did a windows update (they were already Win10 so just a release) and the printer list in ATE no longer matched Windows. Every time they selected their default printer in ATE (top of list in ATE) it printed to Cindy's printer (3rd in list same model.) In Windows it printed fine. Also ATE had a dupe printer not showing in Windows list. I did an ATE update and also uninstalled/reinstalled with no success. Somehow deleting Cindy's printer in windows then printing a test page to her default in Windows refreshed the list finally and it worked. See below:
[Linked Image]

The list of printers that ATE displays in the dropdown is built by combining the following:

1. Special built-in ATE printers, e.g. <Prompt>

2. Printers defined via *.PQI[1,7] files (on the ATE workstation)

3. If WINPTRLST.SBX exists in [7,6] on the ATE workstation, and the ATE version is 6.5.1621+, then it calls that routine to enumerate the available printers by querying Windows. (Details below). Otherwise, it scans the list available in the Registry at:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers

Unfortunately, different versions of Windows seem to store the available printers in different places, and the above list is probably not completely in sync with the network. The latest solution to that is WINPTRLST.SBX, which at least leaves it to Windows to figure out where the current printer list is stored. But, the mechanism, because it requires callbacks, depends on an enhancement added in 6.5.1621.

Assuming WINPTRLST.SBX and 6.5.1621+, it does a "level 4" query, which according to the Windows docs, just reads them from the local registry (making it fast), but I'm not sure which section it reads from (and it probably varies with version). WINPTRLST.SBX does allow you to specify other query levels, including one that attempts to actually query the network discovery system and open each network printer that has been discovered, but the problem with that is it can take quite awhile. (This is why the Control Panel applet can sometime take a long time to finish displaying the printer list.)

It may be too late, in the case of this query, to compare the prior contents of that Registry section to the "real" list, and to determine whether 6.5 would have resolved it (assuming you were running 6.4). And it may also be that part of the problem is related to PQI files still on the workstation.

Probably some further investigation is in order. Unfortunately, Windows printing in general, and printer discovery in particular, is abominably complex, with endless overlapping layers of API's and flags, not to mention the variety of possible networks, making it difficult to thoroughly test in any one location. So any feedback from others encountering the issue would certainly be helpful.

I should add that in the earlier version of this discussion there was a suggestion that network printers were also listed in HKCU\Printers\Connections, but at least in the case of the query above, the problem is not that ATE is finding too few printers, but too many.

Last edited by Ty Griffin; 16 Aug 19 04:16 PM.