Discussion Locked

Printing from a DOS application

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to run a DOS application on NT 4.0 Workstation, SP4, that wants to print to LPT1. I could do this on Windows 95 by capturing a printer port to an installed printer. However, this capture capability does not seem to exist on NT. Any ideas how to do this?

8 replies

by dc1

You would need to issue the following command.

NET USE LPT1 \\Server\printer Queue

by mike_mds

Answer #1 is correct, make sure if you want the share to last after rebooting that you use the "persistent" option at the end of the net use command line. I think it is /p, but run net use /? to be sure.

by harryg

The way I did this was to create a batch file that first maps the printer -

NET USE LPT1

Then include the commands to run the DOS application.

I also included NET USE LPT1 /D as the last line of the batch file, to disconnect when finished.

by singhjunk

Both the above answers are pretty right.

At a command prompt (or in a batch file), type:
NET USE LPTx: \\computername\sharename /PERSISTENT:YES

This discussion is closed to new replies.