Microsoft KB Archive/97870

= Running HPREDIR, Shutting it Down, and Using its Output =

Article ID: 97870

Article Last Modified on 7/30/2001



This article was previously published under Q97870



SUMMARY
Hewlett-Packard (HP) Network Printer allows you to route LAN Manager print queues to printers attached directly to the network. HP implements this configuration using HPREDIR.EXE which opens a named pipe to the network printer and configures OS/2 Print Manager to use this pipe as its printing device. By default, HPREDIR runs as a detached process, but if you do not run it detached, it displays information which can help you pinpoint which of many possible conditions has caused a print job to fail.

This article explains how to keep HPREDIR from running as a detached process, and how to stop HPREDIR without taking your server down. Finally, it provides samples of HPREDIR output with comments explaining what the output tells you.



MORE INFORMATION
During the installation of HP Network Printer software, the following line is added at the end of CONFIG.SYS:   RUN=C:\HPNETPRN\HPREDIR.EXE This line starts HPREDIR as a detached process and no output from HPREDIR to STDIO is seen.

Running HPREDIR UN-Detached
To keep HPREDIR from running as a detached process, remove the RUN line from your CONFIG.SYS and reboot your computer. Now you can start HPREDIR from a standard OS/2 window. If you want to have it autostart when your machine boots, add this line to your STARTUP.CMD:   START HPREDIR You can also create an icon with properties that indicate that it should be opened when the system is started.

Shutting Down HPREDIR
If you are running HPREDIR as a detached process and need to shut it down without rebooting your production server, HP has provided this &quot;back door&quot; procedure:


 * 1) Make sure SETUP.EXE in C:\HPNETPRN is not running.
 * 2) Go to your C:\HPNETPRN directory and run INSTALL.EXE.
 * 3) Go through the screens of the install process pressing ENTER until you are prompted for the directory to copy the files to.
 * 4) At this dialog box choose Cancel to exit the Install program. This stops HPREDIR.

Sample Output
HPREDIR output is informative and useful. Here is some sample output with explanations of what HPREDIR is doing when it issues it. Lines beginning with asterisks (*) are comments:   RedirLogFile: hpredir.log hFile in OpenErrorLog: 00 AdapterType: 0x400 cfgFile: hpredir.cfg

* * These lines indicate that HPREDIR is loading and going * through its initialization process. It opens the log file, * determines the adapter type and sets up its configuration. * Waiting for a connection... * * HPREDIR is trying to set up the connection to the * network printer and awaiting the printer's response. * Waiting for DosConnectNmPipe. * * The printer connection has been established and the pipe * to which the OS/2 print spooler will submit jobs is open. * HPREDIR is waiting for a job to be submitted. *

Spooler opened namedpipe!! Elapsed: 11.125 seconds Sent: 41       Bytessec: 1.000 Waiting for DosConnectNmPipe. Spooler opened namedpipe!! Elapsed: 0.062 seconds Sent: 2159      Bytessec: 1.000 Waiting for DosConnectNmPipe.

* * A standard print job has been sent to the printer * The spooler started sending data to the named pipe, * so we see the &quot;Spooler opened namedpipe!!&quot; message. * The next line shows how long it took to print the file. * There are two entries here because this queue was set up * with a separator page. The first two lines show the * separator page printing and the next two lines show the * actual job printing. When the separator page and job have * finished printing, HPREDIR waits for the next job. *

CloseStation: 0x4b In WriteErrorLog...  Exiting WriteErrorLog (no ERROR)...

* * These show an example of printer connection being lost * because the network cable was pulled out of the back of * the server. A similar error can be created by any number * of lower level network problems.

Additional query words: 2.10 2.10a 2.20 HPREDIR.EXE print QUEUE DRIVER COMTOKR

Keywords: KB97870

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.