Solved

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

Posted on 2003-12-10
12
2,894 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 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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 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: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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

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…
In this blog we highlight approaches to managed security as a service.  We also look into ConnectWise’s value in aiding MSPs’ security management and indicate why critical alerting is a necessary integration.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 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