Printing from DOS to network printer

J

James Shilstone

I have been able to print to a network printer from our DOS program by
using the DOS command

NET USE LPT1: \\computer-name\printer-name /persistent:yes

Now I am running into the problem of printing to a network printer
that has an ethernet port on the printer. In <Printers> <Properties>
<Ports> all I have is "ip_10.2.150.10". There is no computer involved.
I've tried:

NET USE LPT1: \\10.2.150.10 /persistent:yes

and

NET USE LPT1: \10.2.150.10 /persistent:yes

and both result in a "System Error 66"

I assume I need something like:

NET USE LPT1: \\10.2.150.10\printer-name /persistent:yes

I am having trouble identifying the actual printer name. Any ideas how
to do this. "NET VIEW \\10.2.150.10" doesn't work. The name on the
"Printers and Faxes" screen has a lot of spaces, so I think that won't
work. Do I need to do:

NET USE LPT1: "\\10.2.150.10\Canon IR2200-300 PCL5" /persistent:yes

Is there an easy way to identify the computer-name and printer-name
inside of WinXP?

Thanks,
Jay Shilstone
 
C

Cari \(MS MVP\)

If your shared printer name really is Canon IR2200-300,it's too long (max 12
characters/numbers) AND you have Spaces in it!

Make it shorter and get rid of the spaces....how about CanonIR2200

If it's DOS, you may have to go back to 8 characters!
 
J

James Shilstone

Afraid I don't know how to change it. My customer is in another state
and I don't have access to the printer. However, I am thinking that
what I quoted may not be the real printer name. Any idea how to find
the real shared name?

Thanks,
Jay Shilstone
 
C

Cari \(MS MVP\)

Tell him/her to right click on the printer icon in Printers & Faxes in the
Control Panel, select Properties and then on the Sharing tab.
 
R

Reverse first and last names

I have finally found a customer patient enough to go through all the
rigamarole to test this out. I still have some customers that can't
print from our DOS program to a USB printer. Here is what we have:

Customer has a Toshiba Satellite M35X-S114 and wants to print to an HP
Photosmart 8150 on a local USB port. He is using WinXP, but I don't
know if it is Home or Pro and don't know the SP.

Here is what we have tried:

Turned on Printer Pooling and checked LPT1 as well as the USB port.
Doesn't work. Our program thinks it is printing, so it thinks there is
an LPT port available.

Shared the printer as "HP8150". Went to DOS. Ran

NET USE LPT1: \\user\HP8150 /persistent:yes

"user" was a 4 letter username, so everything is DOS legal.

Got an error "System error 1231. Network location cannot be reached."

Tried NET USE LPT1: \\127.0.0.1\HP8150 /persistent:yes

Got the same error 1231. Interesting thing is, when we open Device
Manager, there is no "Ports" section. I think the computer doesn't
"know" anything about LPT1, but it was there on the list of ports in
the printer setup. I forgot to try "NET VIEW \\user", but in the past
when I have tried this, it shows the printer, but "NET USE" won't
work.

We tried DOS2USB and it didn't work. We're about to try DOSPRN, but
when I tried it on my own computer, it ran very slowly (like about 10
minutes per page).

Anyone have any other ideas? I have checked Bruce Sanderson's page and
it just has the above suggestions.

FYI, I KNOW we need to convert the software to Windows. We are working
on it. For now, I have to get the DOS program to print.

Thanks,
Jay
 
R

Reverse first and last names

Just a follow-up. I used the "Net View" command and I could see the
printer. I just can't use the "Net Use" command to redirect to it.

Jay
 
J

jmspital

Reverse said:
I have finally found a customer patient enough to go through all the
rigamarole to test this out. I still have some customers that can't
print from our DOS program to a USB printer. Here is what we have:

Customer has a Toshiba Satellite M35X-S114 and wants to print to an HP
Photosmart 8150 on a local USB port. He is using WinXP, but I don't
know if it is Home or Pro and don't know the SP.

Here is what we have tried:

Turned on Printer Pooling and checked LPT1 as well as the USB port.
Doesn't work. Our program thinks it is printing, so it thinks there is
an LPT port available.

Shared the printer as "HP8150". Went to DOS. Ran

NET USE LPT1: \\user\HP8150 /persistent:yes

"user" was a 4 letter username, so everything is DOS legal.

Got an error "System error 1231. Network location cannot be reached."

Tried NET USE LPT1: \\127.0.0.1\HP8150 /persistent:yes

Got the same error 1231. Interesting thing is, when we open Device
Manager, there is no "Ports" section. I think the computer doesn't
"know" anything about LPT1, but it was there on the list of ports in
the printer setup. I forgot to try "NET VIEW \\user", but in the past
when I have tried this, it shows the printer, but "NET USE" won't
work.

We tried DOS2USB and it didn't work. We're about to try DOSPRN, but
when I tried it on my own computer, it ran very slowly (like about 10
minutes per page).

Anyone have any other ideas? I have checked Bruce Sanderson's page and
it just has the above suggestions.

FYI, I KNOW we need to convert the software to Windows. We are working
on it. For now, I have to get the DOS program to print.

Thanks,
Jay

Jay,
I've had good luck with this command line:

type net use lpt1: \\servername\printerSharedName /persistent:yes

Where servername is the hostname of the computer the printer is
connected to, in this case it's the computer you are on.

Type "net use" to see if an lpt1 port is alread setup and if it is
type "net use lpt1: /delete"

Hopefully this will help.
 
R

Reverse first and last names

Jay,
I've had good luck with this command line:

type net use lpt1: \\servername\printerSharedName /persistent:yes

Where servername is the hostname of the computer the printer is
connected to, in this case it's the computer you are on.

Type "net use" to see if an lpt1 port is alread setup and if it is
type "net use lpt1: /delete"

Hopefully this will help.

Thank you for your response, but as I said in the original message,
that results in "System error 1231. Network location cannot be
reached." I get the impression that WinXP isn't recognizing LPT1 as a
reserve device, since there is no parallel port on the laptop.

Any other ideas?

Thanks,
Jay
 
R

Reverse first and last names

Yes.

Any assistance you can give me would be greatly appreciated.

Jay
 
K

Klaus Jorgensen

Reverse first and last names wrote :
I have finally found a customer patient enough to go through all the
rigamarole to test this out. I still have some customers that can't
print from our DOS program to a USB printer. Here is what we have:

Customer has a Toshiba Satellite M35X-S114 and wants to print to an HP
Photosmart 8150 on a local USB port. He is using WinXP, but I don't
know if it is Home or Pro and don't know the SP.

Here is what we have tried:

Turned on Printer Pooling and checked LPT1 as well as the USB port.
Doesn't work. Our program thinks it is printing, so it thinks there is
an LPT port available.

Are you sure this printer understands data from a DOS-program?


/klaus
 
R

Reverse first and last names

Reverse first and last names wrote :

Are you sure this printer understands data from a DOS-program?


/klaus

It shouldn't matter about the printer. It is failing before sending
anything to the printer. The command

NET USE LPT1: \\server\printer /persistent:yes

returns error "System error 1231. Network location cannot be reached."

I think the problem may be that the laptop mfgr. may have edited WinXP
to remove the reference to LPT1: as a reserve word since there is no
parallel port on the laptop.

Thanks for your response, though.
Jay
 
K

Klaus Jorgensen

Reverse first and last names wrote :
It shouldn't matter about the printer. It is failing before sending
anything to the printer. The command

NET USE LPT1: \\server\printer /persistent:yes

returns error "System error 1231. Network location cannot be reached."

I was referring to the pooling trick where I took it that your print
job vanished into thin air. That often happens when sending DOS data to
a GDI-printer.


/klaus
 
R

Reverse first and last names

Reverse first and last names wrote :

I was referring to the pooling trick where I took it that your print
job vanished into thin air. That often happens when sending DOS data to
a GDI-printer.


/klaus

You could be right, but I have had good luck with HP printers. My
Photosmart 1000 works fine. I'll try again.

Thanks,
Jay
 

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