Discussion:
Unable to initialize device prn
(too old to reply)
Jens R. Rasmussen
2009-10-01 21:10:05 UTC
Permalink
Hi,

I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.

I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?

Can anybody help me?

regards
Jens
ANONYMOUS
2009-10-01 21:42:50 UTC
Permalink
In windows you can't use a print command. This used to be a DOS command
but in Windows you can try this:

copy FILENAME.txt lpt3 /b

where FILENAME.txt is your file name and lpt3 is your printer port.
Please also note that DON'T send a binary file to the prn port because
you will only get gibberish and lots of paper waste.

If LPT3 gives you an error then just replace it with LPT.

Hope this helps.
Post by Jens R. Rasmussen
Hi,
I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.
I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?
Can anybody help me?
regards
Jens
Steve Rindsberg
2009-10-02 01:30:34 UTC
Permalink
Post by ANONYMOUS
In windows you can't use a print command. This used to be a DOS command
copy FILENAME.txt lpt3 /b
where FILENAME.txt is your file name and lpt3 is your printer port.
Please also note that DON'T send a binary file to the prn port because
you will only get gibberish and lots of paper waste.
True; but since that's the case, you don't need the /b (which says to copy BINARY
.. meaning "Don't stop copying if you encounter a Ctrl+Z character, which'd
normally mean END OF FILE")

/B is useful if you've printed to file from the print dialog box; in that case,
the output might well BE binary. As long as you're COPY /B ing it to the same
printer type as was targeted in the print dialog box, it's the only way to make
it work.
Post by ANONYMOUS
If LPT3 gives you an error then just replace it with LPT.
Hope this helps.
Post by Jens R. Rasmussen
Hi,
I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.
I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?
Can anybody help me?
regards
Jens
Jens R. Rasmussen
2009-10-02 12:47:01 UTC
Permalink
Thanks so far to both Anonymous and Steve. But I think I forgot to tell You
the following important thing:

On my old pc I can print from command promt - but from the new pc, I can't.

Both pc's are running xp. The only differens is that the new pc was not born
with a LPT-port, so I had to buy such a port and install it. That is why my
guess is, that I have to configure it in some way - but which way?

Why do I want to print from command prompt? Because I have a very important
- but old - program, which makes and sends billings to a matrix printer - and
'yes' it is written in DOS. It works perfect from the old xp-computer - but
nothing happens from the new computer.

So do you know how I can configure the port or configure command promt - so
my DOS-program can send the print jobs to the new pc as well as it can to the
old pc?

regards
/Jens
Post by Steve Rindsberg
Post by ANONYMOUS
In windows you can't use a print command. This used to be a DOS command
copy FILENAME.txt lpt3 /b
where FILENAME.txt is your file name and lpt3 is your printer port.
Please also note that DON'T send a binary file to the prn port because
you will only get gibberish and lots of paper waste.
True; but since that's the case, you don't need the /b (which says to copy BINARY
... meaning "Don't stop copying if you encounter a Ctrl+Z character, which'd
normally mean END OF FILE")
/B is useful if you've printed to file from the print dialog box; in that case,
the output might well BE binary. As long as you're COPY /B ing it to the same
printer type as was targeted in the print dialog box, it's the only way to make
it work.
Post by ANONYMOUS
If LPT3 gives you an error then just replace it with LPT.
Hope this helps.
Post by Jens R. Rasmussen
Hi,
I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.
I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?
Can anybody help me?
regards
Jens
Bob I
2009-10-02 13:49:41 UTC
Permalink
This groups primary focus is Microsoft Office applications, so perhaps
the folks over in the Windows XP hardware group could give you some
guidance. FWIW in the old DOS world, PRN was LPT1, and if you set that
port up to be LPT1 (check the documentation that came with the card) you
would probably have more success.
Post by Jens R. Rasmussen
Thanks so far to both Anonymous and Steve. But I think I forgot to tell You
On my old pc I can print from command promt - but from the new pc, I can't.
Both pc's are running xp. The only differens is that the new pc was not born
with a LPT-port, so I had to buy such a port and install it. That is why my
guess is, that I have to configure it in some way - but which way?
Why do I want to print from command prompt? Because I have a very important
- but old - program, which makes and sends billings to a matrix printer - and
'yes' it is written in DOS. It works perfect from the old xp-computer - but
nothing happens from the new computer.
So do you know how I can configure the port or configure command promt - so
my DOS-program can send the print jobs to the new pc as well as it can to the
old pc?
regards
/Jens
Post by Steve Rindsberg
Post by ANONYMOUS
In windows you can't use a print command. This used to be a DOS command
copy FILENAME.txt lpt3 /b
where FILENAME.txt is your file name and lpt3 is your printer port.
Please also note that DON'T send a binary file to the prn port because
you will only get gibberish and lots of paper waste.
True; but since that's the case, you don't need the /b (which says to copy BINARY
... meaning "Don't stop copying if you encounter a Ctrl+Z character, which'd
normally mean END OF FILE")
/B is useful if you've printed to file from the print dialog box; in that case,
the output might well BE binary. As long as you're COPY /B ing it to the same
printer type as was targeted in the print dialog box, it's the only way to make
it work.
Post by ANONYMOUS
If LPT3 gives you an error then just replace it with LPT.
Hope this helps.
Post by Jens R. Rasmussen
Hi,
I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.
I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?
Can anybody help me?
regards
Jens
Steve Rindsberg
2009-10-02 15:06:04 UTC
Permalink
Post by Jens R. Rasmussen
Why do I want to print from command prompt? Because I have a very important
- but old - program, which makes and sends billings to a matrix printer - and
'yes' it is written in DOS. It works perfect from the old xp-computer - but
nothing happens from the new computer.
So you have the same dot-matrix printer hooked up to the new parallel port on the new
PC, is that correct?

Check Device Manager to make sure that Windows properly recognizes the port and that
it's assigned to the same LPTx that you think it has been.

If so, copy /b to that port should work.

Another trick is to share the printer then

copy /b filename.ext PrinterShareName
Post by Jens R. Rasmussen
So do you know how I can configure the port or configure command promt - so
my DOS-program can send the print jobs to the new pc as well as it can to the
old pc?
regards
/Jens
Post by Steve Rindsberg
Post by ANONYMOUS
In windows you can't use a print command. This used to be a DOS command
copy FILENAME.txt lpt3 /b
where FILENAME.txt is your file name and lpt3 is your printer port.
Please also note that DON'T send a binary file to the prn port because
you will only get gibberish and lots of paper waste.
True; but since that's the case, you don't need the /b (which says to copy BINARY
... meaning "Don't stop copying if you encounter a Ctrl+Z character, which'd
normally mean END OF FILE")
/B is useful if you've printed to file from the print dialog box; in that case,
the output might well BE binary. As long as you're COPY /B ing it to the same
printer type as was targeted in the print dialog box, it's the only way to make
it work.
Post by ANONYMOUS
If LPT3 gives you an error then just replace it with LPT.
Hope this helps.
Post by Jens R. Rasmussen
Hi,
I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.
I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?
Can anybody help me?
regards
Jens
Jens R. Rasmussen
2009-10-02 19:37:02 UTC
Permalink
Thanks to both of you. You gave me some guidence. And now it works. What have
I done?

I simply uninstalle the port LPT3 and reinstalled it as LPT1 - and now it
works.

I almost dont dare to close close down the pc and restarts it. Hopefully the
succesfully reinstallation keeps on working.

And once again - thanks for you quick answers to me, a dummy in this stuff.

best regards
Jens
PS: If you happen to visit Copenhagen one day, I own you a beer :-)
Post by Steve Rindsberg
Post by Jens R. Rasmussen
Why do I want to print from command prompt? Because I have a very important
- but old - program, which makes and sends billings to a matrix printer - and
'yes' it is written in DOS. It works perfect from the old xp-computer - but
nothing happens from the new computer.
So you have the same dot-matrix printer hooked up to the new parallel port on the new
PC, is that correct?
Check Device Manager to make sure that Windows properly recognizes the port and that
it's assigned to the same LPTx that you think it has been.
If so, copy /b to that port should work.
Another trick is to share the printer then
copy /b filename.ext PrinterShareName
Post by Jens R. Rasmussen
So do you know how I can configure the port or configure command promt - so
my DOS-program can send the print jobs to the new pc as well as it can to the
old pc?
regards
/Jens
Post by Steve Rindsberg
Post by ANONYMOUS
In windows you can't use a print command. This used to be a DOS command
copy FILENAME.txt lpt3 /b
where FILENAME.txt is your file name and lpt3 is your printer port.
Please also note that DON'T send a binary file to the prn port because
you will only get gibberish and lots of paper waste.
True; but since that's the case, you don't need the /b (which says to copy BINARY
... meaning "Don't stop copying if you encounter a Ctrl+Z character, which'd
normally mean END OF FILE")
/B is useful if you've printed to file from the print dialog box; in that case,
the output might well BE binary. As long as you're COPY /B ing it to the same
printer type as was targeted in the print dialog box, it's the only way to make
it work.
Post by ANONYMOUS
If LPT3 gives you an error then just replace it with LPT.
Hope this helps.
Post by Jens R. Rasmussen
Hi,
I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.
I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?
Can anybody help me?
regards
Jens
Steve Rindsberg
2009-10-02 20:06:48 UTC
Permalink
Hi Jens,

Hey, glad to hear that it worked. Can I transfer my Beer Credit to my brother? He gets
to Denmark every so often; he doesn't like beer generally but very happily makes an
exception for Danish beer.
Post by Jens R. Rasmussen
Thanks to both of you. You gave me some guidence. And now it works. What have
I done?
I simply uninstalle the port LPT3 and reinstalled it as LPT1 - and now it
works.
I almost dont dare to close close down the pc and restarts it. Hopefully the
succesfully reinstallation keeps on working.
And once again - thanks for you quick answers to me, a dummy in this stuff.
best regards
Jens
PS: If you happen to visit Copenhagen one day, I own you a beer :-)
Post by Steve Rindsberg
Post by Jens R. Rasmussen
Why do I want to print from command prompt? Because I have a very important
- but old - program, which makes and sends billings to a matrix printer - and
'yes' it is written in DOS. It works perfect from the old xp-computer - but
nothing happens from the new computer.
So you have the same dot-matrix printer hooked up to the new parallel port on the new
PC, is that correct?
Check Device Manager to make sure that Windows properly recognizes the port and that
it's assigned to the same LPTx that you think it has been.
If so, copy /b to that port should work.
Another trick is to share the printer then
copy /b filename.ext PrinterShareName
Post by Jens R. Rasmussen
So do you know how I can configure the port or configure command promt - so
my DOS-program can send the print jobs to the new pc as well as it can to the
old pc?
regards
/Jens
Post by Steve Rindsberg
Post by ANONYMOUS
In windows you can't use a print command. This used to be a DOS command
copy FILENAME.txt lpt3 /b
where FILENAME.txt is your file name and lpt3 is your printer port.
Please also note that DON'T send a binary file to the prn port because
you will only get gibberish and lots of paper waste.
True; but since that's the case, you don't need the /b (which says to copy BINARY
... meaning "Don't stop copying if you encounter a Ctrl+Z character, which'd
normally mean END OF FILE")
/B is useful if you've printed to file from the print dialog box; in that case,
the output might well BE binary. As long as you're COPY /B ing it to the same
printer type as was targeted in the print dialog box, it's the only way to make
it work.
Post by ANONYMOUS
If LPT3 gives you an error then just replace it with LPT.
Hope this helps.
Post by Jens R. Rasmussen
Hi,
I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.
I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?
Can anybody help me?
regards
Jens
m***@gmail.com
2014-10-25 15:35:48 UTC
Permalink
Post by Jens R. Rasmussen
Thanks to both of you. You gave me some guidence. And now it works. What have
I done?
I simply uninstalle the port LPT3 and reinstalled it as LPT1 - and now it
works.
I almost dont dare to close close down the pc and restarts it. Hopefully the
succesfully reinstallation keeps on working.
And once again - thanks for you quick answers to me, a dummy in this stuff.
best regards
Jens
PS: If you happen to visit Copenhagen one day, I own you a beer :-)
Post by Steve Rindsberg
Post by Jens R. Rasmussen
Why do I want to print from command prompt? Because I have a very important
- but old - program, which makes and sends billings to a matrix printer - and
'yes' it is written in DOS. It works perfect from the old xp-computer - but
nothing happens from the new computer.
So you have the same dot-matrix printer hooked up to the new parallel port on the new
PC, is that correct?
Check Device Manager to make sure that Windows properly recognizes the port and that
it's assigned to the same LPTx that you think it has been.
If so, copy /b to that port should work.
Another trick is to share the printer then
copy /b filename.ext PrinterShareName
Post by Jens R. Rasmussen
So do you know how I can configure the port or configure command promt - so
my DOS-program can send the print jobs to the new pc as well as it can to the
old pc?
regards
/Jens
Post by Steve Rindsberg
Post by ANONYMOUS
In windows you can't use a print command. This used to be a DOS command
copy FILENAME.txt lpt3 /b
where FILENAME.txt is your file name and lpt3 is your printer port.
Please also note that DON'T send a binary file to the prn port because
you will only get gibberish and lots of paper waste.
True; but since that's the case, you don't need the /b (which says to copy BINARY
... meaning "Don't stop copying if you encounter a Ctrl+Z character, which'd
normally mean END OF FILE")
/B is useful if you've printed to file from the print dialog box; in that case,
the output might well BE binary. As long as you're COPY /B ing it to the same
printer type as was targeted in the print dialog box, it's the only way to make
it work.
Post by ANONYMOUS
If LPT3 gives you an error then just replace it with LPT.
Hope this helps.
Post by Jens R. Rasmussen
Hi,
I have a pc running XP and a printer connected to LPT3 (i dont know why 3,
for I only have one LPT port). From windows I can send a print job to the
printer without problems. However when I try to send a print job from command
promt, i.e. 'PRINT filename', nothing happens and I get the error message
'Unable to iniliatize device PRN'.
I installed the LPT device recently - so may be I have to set some
parameters for command promt somewhere?
Can anybody help me?
regards
Jens
I changed lpt3 to lpt1 in device manager it is working Thanks for ur guidelines
Kshirja Rajput
2023-02-15 04:12:45 UTC
Permalink
if you use VS code type python in the command prompt and try to run your code.
i***@gmail.com
2013-01-26 07:38:43 UTC
Permalink
i have a solution if you want pls contact me infotech computers 9495534923,8892254785
a***@gmail.com
2014-07-02 16:18:32 UTC
Permalink
I ran into the problem by putting the word print in the filename. I changed the filename and things got smooth again.
Loading...