Printing to USB printer from old DOS app that only knows about LPT1

Hi,

Windows 2000 Pro, local USB printer (HP DeskJet), and old DOS app that only prints to LPT1.

Now, I read somewhere some time ago, that the workaround is to share the printer, then capture the shared printer to LPT1. I think I even made it work that way once.

But, this time it did not work!?

I did following:

net use lpt1 \\pcname\\printername /persistent:yes

captured sucessfully.

then tried to print:

dir > lpt1 (in the directory that had more then one page worth of files)

did not work.

restarted the computer

net use

lpt1 shows as being there, but still no printing.

Anyone has any ideas how to make this work? I need to make this work over the phone tomorrow, but I'm running out of ideas.

Thanks
LVL 4
astankovicAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LucFEMEA Server EngineerCommented:
Hi astankovic,

net use lpt1 \\pcname\\printername /persistent:yes
should be net use lpt: \\pcname\\printername /persistent:yes



Greetings,

LucF
0
astankovicAuthor Commented:
> net use lpt1 \\pcname\\printername /persistent:yes

this is a typo, i did not use double black slashes after computer name
0
LucFEMEA Server EngineerCommented:
oops, mistake, should be: net use lpt2: \\pcname\printername /persistent:yes
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

LucFEMEA Server EngineerCommented:
another mistake from my side :-( it's getting late here.

net use lpt: \\pcname\printername /persistent:yes
0
astankovicAuthor Commented:
LucF,

why lpt: instead of lpt1? Can you explain a bit? I've never seen this before.
0
Fatal_ExceptionSystems EngineerCommented:
LucF, you are a riot.  All that TS got to you today, eh?  BrainBurn.  :)

FE
0
LucFEMEA Server EngineerCommented:
Sort of... yes... Need some sleep... going to take it soon...
0
LucFEMEA Server EngineerCommented:
>why lpt: instead of lpt1? Can you explain a bit? I've never seen this before.
lpt1 is not a device, lpt: or lpt1: is a device, so your application knows what to look for.
0
LucFEMEA Server EngineerCommented:
>then tried to print:
>dir > lpt1 (in the directory that had more then one page worth of files)
>did not work.

try dir > lpt: and it should work if the port is captured the right way.
0
LucFEMEA Server EngineerCommented:
Good morning, just had some sleep and arrived at my job. Just taken a look at the script I use here.

This is the one I use:
NET USE LPT1: \\<servername>\<printername> /PERSISTENT:YES

And it does the job for me.

If the usb printer is on the same computer, try:

NET USE LPT1: \\localhost\<printername> /PERSISTENT:YES
or: NET USE LPT1: \\127.0.0.1\<printername> /PERSISTENT:YES

I also assumed that you knew that you have to share the printer to be able to capture it this way, and that you have to use the sharename in the NET USE line.

Greetings,

LucF
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fatal_ExceptionSystems EngineerCommented:
Way to Go!   LucF  :)
0
LucFEMEA Server EngineerCommented:
Glad to help. I have to say, I had to check it myself, it's a long time ago I was having the same problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.