?
Solved

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

Posted on 2003-12-10
12
Medium Priority
?
2,896 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 2
  • 2
12 Comments
 
LVL 32

Expert Comment

by:LucF
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:LucF
ID: 9916269
oops, mistake, should be: net use lpt2: \\pcname\printername /persistent:yes
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 32

Expert Comment

by:LucF
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:LucF
ID: 9916399
Sort of... yes... Need some sleep... going to take it soon...
0
 
LVL 32

Expert Comment

by:LucF
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:LucF
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:
LucF earned 2000 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:LucF
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

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…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 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