DOS printing on a network printer

K

kim2000

Hello all,

I have a small Win98 peer to peer TCP/IP network. One of my DOS
programs on one system on the network prints PCL to a laser printer
connected to LPT1.

I now have a new network printer, HP1320n, that plugs straight into my
network switch. The printer's IP is 192.168.1.10. This printer works
perfectly from Windows, both using the PCL driver and the PS driver.
When I open the Printer Properties/Details tab on the system that has
the DOS program, the Port is shown as (again for both the PCL and PS
drivers):

hpLaserJet1320series (HP Standard TCP/IP Port)

Now I want to redirect the lpt output from the DOS program (and only
from the DOS program) to this printer. This is what I did:

First I made the printer a shared printer and called it HP1320n.

Then I used the Net Use command:

NET USE LTP1 \\one\\hp1320n

where "one" is the name of the computer but I got the following error:

Error 2106: This operation cannot be performed to your own computer; it
can only be performed to a server.

What do I do to resolve this? Do I really need to make it a shared
printer before the Net Use command? After all the printer is already on
the network. I tried the following:

net use lpt1 "HP Standard TCP/IP Port"

and

net use lpt1 "hpLaserJet1320series (HP Standard TCP/IP Port)"

and even

net use lpt1 \\192.168.1.10

and got syntax errors each time.

I want to be able to put the Net Use command in a batch file so that I
can remove the redirect using the /delete switch after the DOS program
is closed.

All help appreciated.

- Kim
 
K

kim2000

Ok, now I have looked at the link and it is the same as what I have
already done. My problem is that in Win98, the Net Use command does not
allow me to reference a local device:

NET USE LPT1 \\ONE\HP1320N
I cannot issue the above command on computer ONE.

- Kim
 
K

kim2000

Hello,
Try NET USE LPT1: \\one\hp1320n

Are you referring to my typo? Or to the colon :)) after LPT1 ? I've
tried both. I get the same error error.

As far as I can make out, Win98 will not let me issue the above command
from computer "one". And it is not limited to printer port redirection.
- Kim
 
J

JC Dill

Hello,


Are you referring to my typo? Or to the colon :)) after LPT1 ? I've
tried both. I get the same error error.

As far as I can make out, Win98 will not let me issue the above command
from computer "one". And it is not limited to printer port redirection.
- Kim

I'm baffled regarding the "win98 will not let me" bit. Aren't you
doing this in DOS? Have you tried booting into DOS (so that Windoze
isn't running at all) and trying it?

Second, since you are using a network: Try setting this printer as a
shared printer another computer (which would then be the "server" to
your win98 computer with the DOS program) and then accessing it using
NET USE LPT1: \\TWO\HP1320N

jc
 
K

kim2000

Hello JC Dill,
I'm baffled regarding the "win98 will not let me" bit. Aren't you
doing this in DOS? Have you tried booting into DOS (so that Windoze
isn't running at all) and trying it?

I'm doing it in a DOS box under Windows 98. I haven't tried booting
into DOS and trying it; I will. Though I wonder whether Windows Shared
printers will be available under "pure" DOS.
Second, since you are using a network: Try setting this printer as a
shared printer another computer (which would then be the "server" to
your win98 computer with the DOS program) and then accessing it using
NET USE LPT1: \\TWO\HP1320N

That works perfectly! It only means that the second computer has to be
on for me to print from the first one.

And, yes, when I issue the

NET USE LPT1: \\TWO\HP1320n

from computer "TWO", I get the same problem.

But I *can* use the following on "TWO":

NET USE LPT1: \\ONE\HP1320n

I am now convinced Windows 98 does not allow the net use command to
refer to the host computer as a server. This is not so with later
versions of Windows.

I will use the workaround you found until I resolve this. I really
would like to not have to switch on another computer to print. I did
get a network printer so that we wouldn't have to be running a print
server. :(

If there are some other utilities available that will redirect port
output, I wouldn't mind using them -- as long as they don't interfere
with the data stream. Some of the "DOS Printing on Windows Printer"
utilities I have explored all massage the data stream in some way
(converting Epson ESC codes for example).
Thanks anyway for finding a workaround.

- Kim
 
O

Ototin

And, yes, when I issue the

NET USE LPT1: \\TWO\HP1320n

from computer "TWO", I get the same problem.

But I *can* use the following on "TWO":

NET USE LPT1: \\ONE\HP1320n

The syntax of the NET USE command is

NET USE port: \\[computer name]\[printer]

where computer name is the name of the computer that is sharing the
printer. As I understand it your HP printer is connected to the
network with a JetDirect or something similar. Also your use of ONE as
the computer name is the actual computer that is running the DOS
program. Is that correct? If this is correct then the solution is to
assign a "computer name" to the JetDirect.
 
K

kim2000

Hello Ototin,
The syntax of the NET USE command is

NET USE port: \\[computer name]\[printer]

where computer name is the name of the computer that is sharing the
printer. As I understand it your HP printer is connected to the
network with a JetDirect or something similar.

Correct. The JetDirect is built in.
Also your use of ONE as
the computer name is the actual computer that is running the DOS
program. Is that correct?

Correct. The ONE computer is running the DOS program.
If this is correct then the solution is to
assign a "computer name" to the JetDirect.

How do I do that in Win98?
And what would then be the syntax of the NET USE command?

- Kim
 
O

Ototin

Hello Ototin,
The syntax of the NET USE command is

NET USE port: \\[computer name]\[printer]

where computer name is the name of the computer that is sharing the
printer. As I understand it your HP printer is connected to the
network with a JetDirect or something similar.

Correct. The JetDirect is built in.
Also your use of ONE as
the computer name is the actual computer that is running the DOS
program. Is that correct?

Correct. The ONE computer is running the DOS program.
If this is correct then the solution is to
assign a "computer name" to the JetDirect.

How do I do that in Win98?
And what would then be the syntax of the NET USE command?

You don't do it on the Win98 PC. You do it on the JetDirect. Check
with your User Manual if the configuration is accessable via a web
browser. From the Win98 PC's perspective the JetDirect is just another
PC with a shared printer. So for example, given the name, HPLaser, for
the JetDirect and a shared printer called HP1320n, the command to use
is

NET USE lpt1: \\HPLaser\HP1320n
 
K

kim2000

Hello Ototin,
You don't do it on the Win98 PC. You do it on the JetDirect. Check
with your User Manual if the configuration is accessable via a web
browser. From the Win98 PC's perspective the JetDirect is just another
PC with a shared printer. So for example, given the name, HPLaser, for
the JetDirect and a shared printer called HP1320n, the command to use
is

NET USE lpt1: \\HPLaser\HP1320n

My printer is accessible from a web browser. I just have to type in the
IP address into the URL box.

My printers TCP/IP configuration page displays a host name of
NPIFAD5F3.

When I try

NET USE LPT1: \\NPIFAD5F3\HP1320n

I get error message #53: The computer name specified in the network
path cannot be located....

So Win98 cannot find the NPIFAD5F3 "computer". Even if it could, I
wonder how it would find the shared printer HP1320n on that "computer"
since there is no way I can declare HP1320n as a printer on that
"computer". (On a Win system, I just make the printer shared through
printer properties and assign it a name, can't do that on a printer
"computer".)


- Kim
 
A

Al Dykes

Hello Ototin,


My printer is accessible from a web browser. I just have to type in the
IP address into the URL box.

My printers TCP/IP configuration page displays a host name of
NPIFAD5F3.

When I try

NET USE LPT1: \\NPIFAD5F3\HP1320n

I get error message #53: The computer name specified in the network
path cannot be located....

So Win98 cannot find the NPIFAD5F3 "computer". Even if it could, I
wonder how it would find the shared printer HP1320n on that "computer"
since there is no way I can declare HP1320n as a printer on that
"computer". (On a Win system, I just make the printer shared through
printer properties and assign it a name, can't do that on a printer
"computer".)


- Kim


It's been a long time since I screwed with DOS, and most of it was in
a Novell LAN, having said that.....


Doesn't the DOS client need a redirector funcion to intercept LPTx
output and send it to a remote printer ?

The Net Use command expects to talk to a lanmam/SMB printer queue.
Jetdirect cards have this function, but it may not be enabled or
configured in the printer. Learn how to make the printer generate a
configuration report. On a classic w/98 machine if you share a local
printer you've created a lanman share that other clients can access
with the net use command.

TCP printing is via the LPR/LPRd protocol, another finction that may
not be enabled on your printer. It's my favorite way to make clients
talk to printers and I've set it up on countless NT/w2/xp/*nix systems
(and w98 with jetdirect software). I never tried to make a DOS
machine talk LPR. LPR had been around as a core TCP/unix function for
years. I have no idea what DOS TCP implements it.

I love HP jetdirect printers, but there are a bunch of ways to
implement printing but all the settings on both ends have to agree.
I'd start by getting an XP or w98 system to print, to prove that the
printer is OK, then try to make the DOS machine work.
 
J

JC Dill

When I try

NET USE LPT1: \\NPIFAD5F3\HP1320n

I get error message #53: The computer name specified in the network
path cannot be located....

What about

NET USE LPT1: \\192.168.1.10\HP1320n

?

jc
 
D

Davide Guolo

Kim,
I am now convinced Windows 98 does not allow the net use command to
refer to the host computer as a server. This is not so with later
versions of Windows.

Yes, I confirm this.
If there are some other utilities available that will redirect port
output, I wouldn't mind using them -- as long as they don't interfere
with the data stream. Some of the "DOS Printing on Windows Printer"
utilities I have explored all massage the data stream in some way
(converting Epson ESC codes for example).

My Printfil utility do work in this way (converting ESC codes of any brand).
If you want to test another product of mine which could solve your problem
(without changing the data stream) please go to
http://www.guolo.com/printchr

Kind regards,
Davide Guolo
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.guolo.com/printfil
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------
 
K

kim2000

Davide said:
Yes, I confirm this.

Good to get confirmation from an expert!
My Printfil utility do work in this way (converting ESC codes of any
brand).

I tried Printfil (trial version) and it did not work because of the ESC
code conversion.
If you want to test another product of mine which could solve your problem
(without changing the data stream) please go to
http://www.guolo.com/printchr

I would be happy to try it out. Does it only print files or can it
capture output to the LPT port? If it only print files, I will have to
use a PRN2FILE type utility that captures printer output to a file.

How much would it Printchr cost? [You can write directly to me at
kim2000 at fastmail.fm ]

- Kim
 

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