Solved

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

Posted on 2003-12-10
12
2,890 Views
Last Modified: 2010-04-14
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
0
Comment
Question by:astankovic
  • 8
  • 2
  • 2
12 Comments
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
Hi astankovic,

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



Greetings,

LucF
0
 
LVL 4

Author Comment

by:astankovic
Comment Utility
> net use lpt1 \\pcname\\printername /persistent:yes

this is a typo, i did not use double black slashes after computer name
0
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
oops, mistake, should be: net use lpt2: \\pcname\printername /persistent:yes
0
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
another mistake from my side :-( it's getting late here.

net use lpt: \\pcname\printername /persistent:yes
0
 
LVL 4

Author Comment

by:astankovic
Comment Utility
LucF,

why lpt: instead of lpt1? Can you explain a bit? I've never seen this before.
0
 
LVL 40

Expert Comment

by:Fatal_Exception
Comment Utility
LucF, you are a riot.  All that TS got to you today, eh?  BrainBurn.  :)

FE
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
Sort of... yes... Need some sleep... going to take it soon...
0
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
>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
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
>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
 
LVL 32

Accepted Solution

by:
Luc Franken earned 500 total points
Comment Utility
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
 
LVL 40

Expert Comment

by:Fatal_Exception
Comment Utility
Way to Go!   LucF  :)
0
 
LVL 32

Expert Comment

by:Luc Franken
Comment Utility
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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Find out what Office 365 Transport Rules are, how they work and their limitations managing Office 365 signatures.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now