Article ID: 314499 - View products that this article applies to.
This article was previously published under Q314499
For a Microsoft Windows 2000 version of this article, see 154498
This article describes how to print to a network printer from an MS-DOS-based program in Microsoft Windows XP.
By default, most MS-DOS-based programs print directly to either the LPT1 port or to the LPT2 port. However, the output is not automatically routed across a redirector to a print share unless you use one of the following methods.
Method 1Use the net.exe command to establish a persistent connection. To do this, use the following syntax at a command prompt
net use lptx \\printserver\sharename /persistent:yeswhere x is the number of the printer port that you want to map, where printserver is the print server that is sharing the printer, and where sharename is the name of the printer share.
For example, to map LPT2 to a printer shared as Laser1 on a print server that is named Pserver, follow these steps:
For more information about how to map LPT ports as a regular user, click the following article number to view the article in the Microsoft Knowledge Base:
(https://support.microsoft.com/kb/313644/ )Non-administrators cannot remap an LPT port to a network printer
Method 2Print directly to the printer share by using the following syntax at a command prompt
print /d:\\printserver\sharenamedrive:\path\filenamewhere printserver is the print server sharing the printer, where sharename is the name of the printer share, and where drive:, path, and filename make up the complete path of the document that you want to print.
For example, to print a document that is named letter.doc from the root directory of drive C to a printer shared as Laser1 on a print server that is named Pserver, follow these steps:
net use lptx \\server\queueIf the LPT port is redirected successfully, you receive the following message: To disconnect persistent LPTx connections, use the following syntax:
net use lptx /deleteNote When you try to use the CAPTURE command, you may receive an error message that is similar to the following:
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
CAPTURE-4.01-923: An unexpected error has occurred: 255 (00FF).
156429The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
(https://support.microsoft.com/kb/156429/ )Supported 16-bit utilities and NetWare-aware applications
Article ID: 314499 - Last Review: September 23, 2011 - Revision: 5.0