You are currently offline, waiting for your internet to reconnect

How to Print to Network Printer from MS-DOS-Based Programs

This article was previously published under Q154498
For a Microsoft Windows XP version of this article, see 314499.
This article describes how to print to a network printer from an MS-DOS-based program in Windows. By default, most MS-DOS-based programs printdirectly to either LPT1 or LPT2. However, the output is not automaticallyrouted across a redirector to a print share unless you use one of thefollowing methods.

Method 1

Establish a persistent connection using NET.EXE. To do so, use thefollowing syntax at a command prompt:
net use lptx: \\printserver\sharename /persistent:yes

Method 2

Print directly to the printer share by using the following syntax at acommand prompt:
print /d:\\printserver\sharenamedrive:\path\filename
Because Novell NetWare's CAPTURE command is not supported in Windows NT4.0, use the following command to map the LPT port to a Novell NetWareprinter queue:
net use lptx \\server\queue
If the LPT port is redirected successfully, the following message shouldappear:
The command completed successfully.
To disconnect persistent LPTx connections, use the following syntax:
net use lptx /delete
NOTE: When attempting to use the CAPTURE command, the may receive the following error message (The error message may vary depending on the version of NetWare):
CAPTURE-4.01-923: An unexpected error has occurred: 255 (00FF).
(SPOOL.C: [426])
For additional information, please see the following article in theMicrosoft Knowledge Base:
156429 Supported 16-bit Utilities and NetWare-Aware Applications
Netware is manufactured by Novell, Inc., a vendor independent ofMicrosoft; we make no warranty, implied or otherwise, regarding thisproduct's performance or reliability.
Capture Printer Port LPT1 LPT2 LPT3

Article ID: 154498 - Last Review: 02/27/2007 00:05:00 - Revision: 2.2

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows NT Advanced Server 3.1
  • Microsoft Windows NT Server 3.5
  • Microsoft Windows NT Server 3.51
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 3.1
  • Microsoft Windows NT Workstation 3.5
  • Microsoft Windows NT Workstation 3.51
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Advanced Server 3.1
  • kbhowto kbprint KB154498