DOS printing on a network printer

G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

See:
http://members.shaw.ca/bsanders/printfromdos.htm
--
Cari (MS-MVP Windows Client - Printing, Imaging & Hardware)
www.coribright.com

<kim2000@fastmail.fm> wrote in message
news:1107321861.820382.19260@z14g2000cwz.googlegroups.com...
> 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
>
>
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

On 1 Feb 2005 21:24:21 -0800, kim2000@fastmail.fm wrote:

>Then I used the Net Use command:
>
>NET USE LTP1 \\one\\hp1320n

Try NET USE LPT1: \\one\hp1320n
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

Hello,

> >Then I used the Net Use command:
> >
> >NET USE LTP1 \\one\\hp1320n
>
> 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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

On 2 Feb 2005 08:40:48 -0800, kim2000@fastmail.fm wrote:

>Hello,
>
>> >Then I used the Net Use command:
>> >
>> >NET USE LTP1 \\one\\hp1320n
>>
>> 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

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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

On 1 Feb 2005 21:24:21 -0800, kim2000@fastmail.fm wrote:

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

Are you sharing it via windoze, or DOS? Are you using NET SHARE?

<http://www.groovyweb.uklinux.net/index.php?page_name=net%20use%20complete%20command%20reference%20how%20to%20tutorial>

seems to be an excellent resource on using NET USE.

jc
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

On 2 Feb 2005 15:57:12 -0800, kim2000@fastmail.fm wrote:

>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.
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

JC,


> Have you tried:
>
> NET USE LPT1: \\PrinterIP
>

Yes:

NET USE LPT1 \\192.168.1.10

Didn't work.

- Kim
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

On 2 Feb 2005 21:22:33 -0800, kim2000@fastmail.fm wrote:

>
>> 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?

Have you tried:

NET USE LPT1: \\PrinterIP

?

jc
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

On 2 Feb 2005 21:22:33 -0800, kim2000@fastmail.fm wrote:

>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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

In article <1107443576.338274.241940@f14g2000cwb.googlegroups.com>,
<kim2000@fastmail.fm> wrote:
>
>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
>


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.
--

a d y k e s @ p a n i x . c o m

Don't blame me. I voted for Gore.
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

On 3 Feb 2005 07:12:56 -0800, kim2000@fastmail.fm wrote:


>
>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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

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
--------------------------------------------------------------
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

Davide Guolo wrote:

> > 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.

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
 
G

Guest

Guest
Archived from groups: comp.periphs.printers (More info?)

Kim,

> [You can write directly to me at kim2000 at fastmail.fm ]

have a look at your mailbox.

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
--------------------------------------------------------------