PC Review


Reply
Thread Tools Rate Thread

Cannot print to DOS LPT1:

 
 
Nick Hawthorn
Guest
Posts: n/a
 
      10th Mar 2005
I can print on an HP Laserjet 4200n printer from MS Word under
Windows 2000. If I then run the DOS command interpreter CMD.EXE,
I can't print through the DOS LPT1: printer name. (This is really
useful, believe it or not.) It used to work well. Just what
caused it to stop working I don't know, but a new printer was
installed. The DOS command

net use lpt1: \\host\printer /persistent:yes

claims to complete successfully. After that, the DOS command

copy file lpt1:

says that 1 file was copied. Watching the printer menu, the file
does appear while it is being copied, but then just vanishes.
Nothing gets printed.

Any help much appreciated. I do wonder if there is another way
of setting up LPT1:.
Thanks,
Nick Hawthorn n dot hawthorn at auckland dot ac dot nz
 
Reply With Quote
 
 
 
 
Davide Guolo
Guest
Posts: n/a
 
      15th Mar 2005
Dear Mr. Nick Hawthorn,

> copy file lpt1:
> says that 1 file was copied. Watching the printer menu, the file
> does appear while it is being copied, but then just vanishes.
> Nothing gets printed.


you may want to have a look at Printfil, which allows you to print your text
files to any Windows printer, including usb, networked and virtual printers
(faxmodems, pdf writers, ...) with many extras, like print preview, font
selection, color, bmp merging etc.

More info and a free trial is available for download at our web site.

Kind regards,
Davide Guolo
--------------------------------------------------------------
Printfil - Windows Printing System for Applications
http://www.guolo.com/printfil
Odbc4All - Connection to ODBC Data Sources for any Application
http://www.guolo.com/odbc4all
--------------------------------------------------------------


 
Reply With Quote
 
steve bill
Guest
Posts: n/a
 
      16th Mar 2005
If you are running Windows XP mapping LPT1 to a network
share doesn't work out of the box. If you read this KB
article it has some advice: http://support.microsoft.com/
kbid=314499. Somewhere I think that it says that "this
behavior is by design". I think mapping local ports to a
network share is some sort of security risk that they
designed out of XP on purpose.

I was able to solve this problem with a batch file with
the following line in it:

C:\devcon\i386\devcon.exe disable *PNP0401

The other lines map the Lptx: ports to various printer
shares.

I don't remember if I had to download devcon.exe from
somewhere or if it was already there. Anyway, once that
command is run on the client machine you can map lptx: to
any network share you want like before.

Make sure you complain loudly and often to the software
vendor or supplier that is making you use that software.
It has to be at least TEN years old. DOS may have been a
wonderful thing in its' day but there is no excuse for
having to use software that old on current equipment. I
complained and the company finally got around to putting
that funcionality on the web.

>-----Original Message-----
>Dear Mr. Nick Hawthorn,
>
>> copy file lpt1:
>> says that 1 file was copied. Watching the printer

menu, the file
>> does appear while it is being copied, but then just

vanishes.
>> Nothing gets printed.

>
>you may want to have a look at Printfil, which allows you

to print your text
>files to any Windows printer, including usb, networked

and virtual printers
>(faxmodems, pdf writers, ...) with many extras, like

print preview, font
>selection, color, bmp merging etc.
>
>More info and a free trial is available for download at

our web site.
>
>Kind regards,
>Davide Guolo
>----------------------------------------------------------

----
>Printfil - Windows Printing System for Applications
> http://www.guolo.com/printfil
>Odbc4All - Connection to ODBC Data Sources for any

Application
> http://www.guolo.com/odbc4all
>----------------------------------------------------------

----
>
>
>.
>

 
Reply With Quote
 
Nick Hawthorn
Guest
Posts: n/a
 
      17th Mar 2005
In article <0e7d01c52a60$6ba54f30$(E-Mail Removed)>, steve bill wrote:
> If you are running Windows XP mapping LPT1 to a network
> share doesn't work out of the box. If you read this KB
> article it has some advice: http://support.microsoft.com/?
> kbid=314499. Somewhere I think that it says that "this
> behavior is by design". I think mapping local ports to a
> network share is some sort of security risk that they
> designed out of XP on purpose.


Thanks for your reply, and thanks for the reference. It was some
help and I was able to download devcon.

> I was able to solve this problem with a batch file with
> the following line in it:
>
> C:\devcon\i386\devcon.exe disable *PNP0401
>
> The other lines map the Lptx: ports to various printer
> shares.


If you still have the batch file, could you post it? What was it called
and where did it go? I tried adding the following lines to the end of
c:\winnt\system32\autoexec.nt.

echo Latest > c:\latest.txt
c:\misc\devcon\i386\devcon disable *PNP0401
net use lpt1: /delete
net use lpt1: \\FMHSc1\HthPsy01 /persistent:yes

The first line showed that the file was executed, by creating
latest.txt. The next three lines are your DEVCON command and NET
USE commands that ought to map lpt1 to the printer. But, lpt1:
still didn't work. It behaved just as it did before -- jobs spool
then disappear. Did you use NET USE or something else, to map Lptx:
ports to printer shares?

> Make sure you complain loudly and often to the software
> vendor or supplier that is making you use that software.
> It has to be at least TEN years old. DOS may have been a
> wonderful thing in its' day but there is no excuse for
> having to use software that old on current equipment. I
> complained and the company finally got around to putting
> that funcionality on the web.


I admit to rather liking DOS. I use the software to make PostScript
files and other things, and don't want to print the files until my
scripts are almost working. I also use FTP to copy files from a
unix system to LPT1: on my PC. This *used* to be a convenient way
to print files. It is me who is choosing to use very old software.

I do wonder if the problem is at the printer end. I have had "cannot
initialize printer" messages. Perhaps initialization by user jobs
has been disabled at the printer -- or something -- I am just guessing.

Any help appreciated!


With thanks,
Nick Hawthorn
 
Reply With Quote
 
Steve Bill
Guest
Posts: n/a
 
      17th Mar 2005
Here is my quite simplistic batch file:

C:\devcon\i386\devcon.exe disable *PNP0401
net use lpt1: \\server\hp2100_3rd /persistent:yes
exit

I put it up on a network share and just ran it whenever I
needed a machine to be able to map lpt1: to a network
server. It wasn't set up to run at login or anything.

I didn't mean to dis your homemade DOS programs ;-).
Usually when I deal with DOS stuff it's crappy, outdated,
insurance software. It's possible that your batch file
worked. When you do net use lpt1: does it show the network
share? If it is properly mapped, try recreating the local
printer and do a test page. That might get you fixed up.

Good Luck!
>-----Original Message-----
>In article <0e7d01c52a60$6ba54f30$(E-Mail Removed)>,

steve bill wrote:
>> If you are running Windows XP mapping LPT1 to a network
>> share doesn't work out of the box. If you read this KB
>> article it has some advice:

http://support.microsoft.com/?
>> kbid=314499. Somewhere I think that it says that "this
>> behavior is by design". I think mapping local ports to

a
>> network share is some sort of security risk that they
>> designed out of XP on purpose.

>
>Thanks for your reply, and thanks for the reference. It

was some
>help and I was able to download devcon.
>
>> I was able to solve this problem with a batch file with
>> the following line in it:
>>
>> C:\devcon\i386\devcon.exe disable *PNP0401
>>
>> The other lines map the Lptx: ports to various printer
>> shares.

>
>If you still have the batch file, could you post it?

What was it called
>and where did it go? I tried adding the following lines

to the end of
>c:\winnt\system32\autoexec.nt.
>
>echo Latest > c:\latest.txt
>c:\misc\devcon\i386\devcon disable *PNP0401
>net use lpt1: /delete
>net use lpt1: \\FMHSc1\HthPsy01 /persistent:yes
>
>The first line showed that the file was executed, by

creating
>latest.txt. The next three lines are your DEVCON command

and NET
>USE commands that ought to map lpt1 to the printer. But,

lpt1:
>still didn't work. It behaved just as it did before --

jobs spool
>then disappear. Did you use NET USE or something else,

to map Lptx:
>ports to printer shares?
>
>> Make sure you complain loudly and often to the software
>> vendor or supplier that is making you use that

software.
>> It has to be at least TEN years old. DOS may have been

a
>> wonderful thing in its' day but there is no excuse for
>> having to use software that old on current equipment. I
>> complained and the company finally got around to

putting
>> that funcionality on the web.

>
>I admit to rather liking DOS. I use the software to make

PostScript
>files and other things, and don't want to print the files

until my
>scripts are almost working. I also use FTP to copy files

from a
>unix system to LPT1: on my PC. This *used* to be a

convenient way
>to print files. It is me who is choosing to use very old

software.
>
>I do wonder if the problem is at the printer end. I have

had "cannot
>initialize printer" messages. Perhaps initialization by

user jobs
>has been disabled at the printer -- or something -- I am

just guessing.
>
>Any help appreciated!
>
>
>With thanks,
>Nick Hawthorn
>.
>

 
Reply With Quote
 
Nick Hawthorn
Guest
Posts: n/a
 
      21st Mar 2005
In article <15b901c52b16$088eac50$(E-Mail Removed)>, Steve Bill wrote:
> Here is my quite simplistic batch file:
>
> C:\devcon\i386\devcon.exe disable *PNP0401
> net use lpt1: \\server\hp2100_3rd /persistent:yes
> exit
>
> I put it up on a network share and just ran it whenever I
> needed a machine to be able to map lpt1: to a network
> server. It wasn't set up to run at login or anything.


I wound up with this:
c:\misc\devcon\i386\devcon.exe disable *PNP0401
net use lpt1: /delete
net use lpt1: \\FMHSc1\HthPsy01 /persistent:yes

After running it I still can't print. It ran without error. Whichever
way I do it from DOS (copy file lpt1 or type file > lpt1 or
print /d:\\FMHSc1\HthPsy01 p:\file), files are spooled
and appear in the printer queue for a little while and then vanish. They
never get printed. Printing from MS Word is fine.

> I didn't mean to dis your homemade DOS programs ;-).


Dis away! My batch files are pretty crude.

> Usually when I deal with DOS stuff it's crappy, outdated,
> insurance software. It's possible that your batch file
> worked. When you do net use lpt1: does it show the network
> share? If it is properly mapped, try recreating the local
> printer and do a test page. That might get you fixed up.


Network share -- I take it this means the remote name as below.
Recreating the local printer -- does that mean deleting LPT1 as in
my batch file and then mapping it again?

Here are the results of "net use lpt1:".

Local name LPT1
Remote name \\FMHSc1\HthPsy01
Resource type Print
Status OK
# Opens 0
# Connections 2
The command completed successfully.

Looks OK, doesn't it? Everything seems to work except the actual
printing. Do you think an error in the printer or queue setup could
be the problem? It would have to be something that discriminates
between MS Word (it works OK and I guess other Windows apps do also)
and any form of DOS printing.

By the way, I am just a user with no supervisor privileges. There are
technical people who help with problems, but they aren't familiar with
DOS.

Thanks very much for your help,
Nick Hawthorn nhn at hpc2 dot auckland dot ac dot nz
 
Reply With Quote
 
Steve Bill
Guest
Posts: n/a
 
      21st Mar 2005
I'm thinking that your DOS program may be having trouble
printing to that fancy printer you've got. The only thing
that I can think of to try is to use a HP LaserJet 4
driver. Create a "local" HP LaserJet 4 printer printing to
the LPT1: port that we just successfully mapped. That
might solve the problem.

Good Luck!
>-----Original Message-----
>In article <15b901c52b16$088eac50$(E-Mail Removed)>,

Steve Bill wrote:
>> Here is my quite simplistic batch file:
>>
>> C:\devcon\i386\devcon.exe disable *PNP0401
>> net use lpt1: \\server\hp2100_3rd /persistent:yes
>> exit
>>
>> I put it up on a network share and just ran it whenever

I
>> needed a machine to be able to map lpt1: to a network
>> server. It wasn't set up to run at login or anything.

>
>I wound up with this:
>c:\misc\devcon\i386\devcon.exe disable *PNP0401
>net use lpt1: /delete
>net use lpt1: \\FMHSc1\HthPsy01 /persistent:yes
>
>After running it I still can't print. It ran without

error. Whichever
>way I do it from DOS (copy file lpt1 or type file >

lpt1 or
>print /d:\\FMHSc1\HthPsy01 p:\file), files are spooled
>and appear in the printer queue for a little while and

then vanish. They
>never get printed. Printing from MS Word is fine.
>
>> I didn't mean to dis your homemade DOS programs ;-).

>
>Dis away! My batch files are pretty crude.
>
>> Usually when I deal with DOS stuff it's crappy,

outdated,
>> insurance software. It's possible that your batch file
>> worked. When you do net use lpt1: does it show the

network
>> share? If it is properly mapped, try recreating the

local
>> printer and do a test page. That might get you fixed

up.
>
>Network share -- I take it this means the remote name as

below.
>Recreating the local printer -- does that mean deleting

LPT1 as in
>my batch file and then mapping it again?
>
>Here are the results of "net use lpt1:".
>
>Local name LPT1
>Remote name \\FMHSc1\HthPsy01
>Resource type Print
>Status OK
># Opens 0
># Connections 2
>The command completed successfully.
>
>Looks OK, doesn't it? Everything seems to work except

the actual
>printing. Do you think an error in the printer or queue

setup could
>be the problem? It would have to be something that

discriminates
>between MS Word (it works OK and I guess other Windows

apps do also)
>and any form of DOS printing.
>
>By the way, I am just a user with no supervisor

privileges. There are
>technical people who help with problems, but they aren't

familiar with
>DOS.
>
>Thanks very much for your help,
>Nick Hawthorn nhn at hpc2 dot auckland dot ac dot

nz
>.
>

 
Reply With Quote
 
Nick Hawthorn
Guest
Posts: n/a
 
      21st Mar 2005
In article <05cb01c52e31$fcc4ac70$(E-Mail Removed)>, Steve Bill wrote:
> I'm thinking that your DOS program may be having trouble
> printing to that fancy printer you've got. The only thing
> that I can think of to try is to use a HP LaserJet 4
> driver. Create a "local" HP LaserJet 4 printer printing to
> the LPT1: port that we just successfully mapped. That
> might solve the problem.


Thanks, but no thanks. Most printers can act like the very simple
printer that DOS knows about. I'll leave this problem for a little
while. Thanks for all your help, just sorry we haven't solved the
problem.

Nick Hawthorn nhn at hpc2 dot auckland dot ac dot nz
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i print the LPT1 ? =?Utf-8?B?THVpcyBSYW1vcw==?= Microsoft VB .NET 1 11th Oct 2005 10:04 PM
lpt1 gone can't print =?Utf-8?B?TWlrZSBW?= Windows XP Print / Fax 6 5th Jan 2005 03:19 AM
xp/cmd copy/print to lpt1-does and does not print gmeiners Windows XP Print / Fax 1 24th Jun 2004 05:58 PM
TCP/IP Print through LPT1 Tony Hopkins Microsoft Windows 2000 Printing 1 21st Dec 2003 11:11 PM
Cannot print to LPT1 Peter Hattam Windows XP Print / Fax 0 20th Aug 2003 04:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:45 AM.