Discussion Locked

Please Help me regarding printing.

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am using Windows NT network, and using account software created in Fox pro in my department of IT. I want to use a network enable shared printer from my computer that's why this is prossible for me to print from my dos based program to print on this shared printer. I used port mapping for this printer and succesfull in printing but my boss asked me that there is also another printer on the network we also want to use this printer with this dos based software. I mean that we want to use these two printers from Dos , but how is this possible that I can use one printer as a default printer for printing and another time I use another as default from Dos, this can happen in windows but how is this possible through DOS.

7 replies

by razzadaz

Some ideas:

net use LPT1: /delete
net use LPT1: \\servername\queuename

The first line clears the assignment, if any, and the second line assigns the LPT port. This will work for printers on NT and Novell servers.

At the command prompt you can also type:
net use /?, for additional syntax

by Member 35772270

On the system that you want to print from open the printer properties, under details, change the port setting to spool print jobs from DOS.

by joseph moore

I actually ran into this a few years ago. Here is what I did:
The answer about Net Use LPT1 is correct. What I did was I set up a 2 BAT files. The first one, APPRUN1, looked like this:
NET USE LPT1 /DELETE
NET USE LPT1 \\SERVER1\PRINTER1
CALL "C:\PROGRAM FILES\APP1\APP1.EXE"

Then the second BAT file, APPRUN2.BAT looked similar:

NET USE LPT1 /DELETE
NET USE LPT1 \\SERVER1\PRINTER2
CALL "C:\PROGRAM FILES\APP2\APP2.EXE"

What this did was it removed the LPT1 printer mapping, just in case it was pointing to the wrong network shared printer. It then would map LPT1 to the right printer, and THEN it called the application I wanted to run that needed to print to each specific printer.
I kept both BAT files on my Desktop, and would double-click thest BAT files instead of the normal Start -> Programs shortcuts.

So, try this. Set up one BAT file for each DOS program and associated network printer.

BTW, you might need to set up a PIF file to run each DOS program; the BAT filewould CALL the PIF file, instead of the EXE file. If you are running DOS programs in NT, then I will assume you already do this.

Hope this helps.

This discussion is closed to new replies.