Discussion Locked

Redirecting LPT1 to a network printer?

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Need to use network printer to print from DOS apps. on NT4. Wasn't given option in printer setup to print from DOS apps.

Do I use the MODE command from a DOS Prompt for this? If so, how? If not, how do I do this?

Thanks.

- John

9 replies

by mhoward

You could conifure LPT1 as a TCP/IP port. Then specify the address of the printer/print server. That is how we have done it in the past

by don christner

You need to use the NET USE command from a DOS prompt. The syntax is:

NET USE LPT1: \\computer name\share name

Make sure that the computer name the printer is on is DOS compatible (8 characters or less, no spaces) and that the printer share name is DOS compatible.

Don

by steby

Since your DOS program allows printing -> select LPTx as Printer port (replace x with your printer port number, usually LPT1), because most DOS apps access the printer hardware (through int17) directly this way.
Finally, click OK/Apply to save the new (Program Information File)PIF editor settings.
Since you are connected to a network, and would like your DOS application(s) to be able to print to a network printer: add this command line to a batch file that starts your DOS program, or type itinto a DOS box:

NET USE LPTx: \\ComputerName\ShareName /PERSISTENT:YES

Replace "x" with the printer port number, "ComputerName" with your computer name, and "ShareName" with your shared name for the specific network you are logging into (no quotes).

by steve penn

Simialr to answer 2.

net use lpt1: /delete
net use lpt1: \\servername\sharename.

Save this as a batch file, and either use it as a login script in user manager for domains OR put a copy in the username's startup folder, so it fires every time you log on.

Hope it helps

Steve.

This discussion is closed to new replies.