Solved

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

Posted on 2003-12-10
12
2,891 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
 
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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

15 Experts available now in Live!

Get 1:1 Help Now