Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows 7 Default Printer Not Detected
    primarykey
    data
    text
    <p>I have an application that uses an old reporting library (ReportPro). On Windows 7 64, it sometimes fails to find the default printer. I did some digging and found the problem in the windows registry. ReportPro determines the available printers via the GetProfileString windows API. It gets a list of available printers from here:</p> <pre><code>HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices </code></pre> <p>It gets the default printer from here:</p> <pre><code>HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device </code></pre> <p>What I'm seeing in the windows registry is the the list of printers will show the name and the network port we are using as: </p> <pre><code>HP LaserJet 5200 Series PCL 5 on Ne03: Microsoft XPS Document Writer on Ne01: HP Officejet Pro K8600 Series on Ne02: Phaser 8860-2 PS on Ne00: CutePDF Writer on CPW2: </code></pre> <p>On some systems the value of the default printer string is different. It would be something like: </p> <p><em>HP LaserJet 5200 Series PCL 5 on <strong>Ne01</strong>:</em></p> <p>In particular the NExx number is different in the default printer value compared to the list of printers.</p> <p>The report package fails to find a default printer as it uses the printer name and the NExx number in the comparison.</p> <p>Why would the NExx values be different and how do I make sure the values "stick"? The solution I have found for the moment is to set a different printer as default and then choose the correct default printer. That seems to resolve the problem temporarily but it is not permanent.</p> <p>This problems seems to be Win7 only. Several of the XP machines have never had this problem in the last 8 years.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload