Share printer under DOS application

S

shtuks

Hi,

I have one question so I hope that there will be someone to help me.

I have DOS app running on WinXP on 2 computers. Both of computers have
installed printers on LPT ports but different types of them (of
printers).
From one computer I'am sharing one printer to another one.

On another one I'am using LPT1 port to print documents from DOS
application. Also I want to use shared printer somethimes from same DOS
application to print different type of documents.

Is possible to arrange that (switching printers)?!

Is there some utility to use or smth like that??

Thanks for answers!
 
A

Andrew Rossmann

[This followup was posted to comp.periphs.printers and a copy was sent
to the cited author.]

I have one question so I hope that there will be someone to help me.

I have DOS app running on WinXP on 2 computers. Both of computers have
installed printers on LPT ports but different types of them (of
printers).


On another one I'am using LPT1 port to print documents from DOS
application. Also I want to use shared printer somethimes from same DOS
application to print different type of documents.

Is possible to arrange that (switching printers)?!

Is there some utility to use or smth like that??

From a command prompt:
NET USE LPT2 \\computer\share

Now, if you print to LPT2, it will go to the shared priner.
 
S

shtuks

Andrew said:
[This followup was posted to comp.periphs.printers and a copy was sent
to the cited author.]

I have one question so I hope that there will be someone to help me.

I have DOS app running on WinXP on 2 computers. Both of computers have
installed printers on LPT ports but different types of them (of
printers).


On another one I'am using LPT1 port to print documents from DOS
application. Also I want to use shared printer somethimes from same DOS
application to print different type of documents.

Is possible to arrange that (switching printers)?!

Is there some utility to use or smth like that??

From a command prompt:
NET USE LPT2 \\computer\share

Now, if you print to LPT2, it will go to the shared priner.

--
If there is a no_junk in my address, please REMOVE it before replying!
All junk mail senders will be prosecuted to the fullest extent of the
law!!
http://home.att.net/~andyross


I know how to share printer, but in situation that you wrote all my
assigns will go to shared printer... Is there any way that I can choose
which printer I wanna use?

I don't want to use shared printer all the time...
 
A

Andrew Rossmann

I know how to share printer, but in situation that you wrote all my
assigns will go to shared printer... Is there any way that I can choose
which printer I wanna use?

I don't want to use shared printer all the time...

Does your DOS program let you select which printer port to use? If so,
you just print to LPT1 for your local printer, LPT2 for a remote, etc..
A properly written DOS program should support up to at least LPT3, so
you can pick between 3.
 
S

shtuks

Andrew said:
Does your DOS program let you select which printer port to use? If so,
you just print to LPT1 for your local printer, LPT2 for a remote, etc..
A properly written DOS program should support up to at least LPT3, so
you can pick between 3.

--
If there is a no_junk in my address, please REMOVE it before replying!
All junk mail senders will be prosecuted to the fullest extent of the
law!!
http://home.att.net/~andyross


Nope, DOS program doesn't let me to choose which port I wanna use and
that is my biggest problem. I have local printer on LPT1 and shared on
LPT2, but printer is using only LPT1 port unless I change that in batch
file. I was wondering if there is some utility which can I use to
change port to be default while DOS app is running under Windows but I
doubt it...

Thank you all
 
A

Andrew Rossmann

Nope, DOS program doesn't let me to choose which port I wanna use and
that is my biggest problem. I have local printer on LPT1 and shared on
LPT2, but printer is using only LPT1 port unless I change that in batch
file. I was wondering if there is some utility which can I use to
change port to be default while DOS app is running under Windows but I
doubt it...

What MIGHT work is creating a batch file with this in it:

@ECHO OFF
NET USE LPT1 \\computer\printer
THEPROGRAM
NET USE LPT1 /D

Then run the batch file instead of the program when starting from
Windows.

The main issue is that I'm not certain if you can NET USE over an
existing LPT port, or if it would confuse any Windows printer software
for the local printer.
 
D

DaveG

What MIGHT work is creating a batch file with this in it:

@ECHO OFF
NET USE LPT1 \\computer\printer
THEPROGRAM
NET USE LPT1 /D

Then run the batch file instead of the program when starting from
Windows.

The main issue is that I'm not certain if you can NET USE over an
existing LPT port, or if it would confuse any Windows printer software
for the local printer.

(I missed the OP so excuse/ignore me if the OP is taking about a DOS
window)

If his shared printer is actually device lpt2: as stated than maybe a mode
command will redirect lpt1: to lpt2: It's a while since I had to that so
I might be wrong. If not, there are many dos utils out there to swap lpt1
& 2 ISTR using in the past.

There's one called lptswap here http://mindprod.com/products4.html
 
D

Davide Guolo

shtuks,
I know how to share printer, but in situation that you wrote all my
assigns will go to shared printer... Is there any way that I can choose
which printer I wanna use?

I don't want to use shared printer all the time...

You may want to have a look at Printfil.
Printfil intercepts your DOS print jobs (from a file or a single LPT port)
and forwards them to a Windows printer installed on the Control Panel. It
also has a "choose" option which allows you to choose the destination
printer for each captured print job (by the standard Windows "choose
printer" dialog)

You can find more info and a free trial version to download at
http://www.printfil.com

Kind regards,
Davide Guolo
aSwIt s.r.l.
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.printfil.com
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.aswit.com/odbc4all
--------------------------------------------------------------
 
S

shtuks

Printfil is solution for my problem ;)

Thank you all for answers, you helped me a lot...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top