Solved

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

Posted on 2003-12-10
12
2,892 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
ID: 9916263
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
ID: 9916267
> 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
ID: 9916269
oops, mistake, should be: net use lpt2: \\pcname\printername /persistent:yes
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 32

Expert Comment

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

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

Author Comment

by:astankovic
ID: 9916284
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
ID: 9916324
LucF, you are a riot.  All that TS got to you today, eh?  BrainBurn.  :)

FE
0
 
LVL 32

Expert Comment

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

Expert Comment

by:Luc Franken
ID: 9916408
>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
ID: 9916422
>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
ID: 9918757
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
ID: 9920534
Way to Go!   LucF  :)
0
 
LVL 32

Expert Comment

by:Luc Franken
ID: 9920801
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

825 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