Ask questions. Help others.
The HP Community is here for you.
Post new question
Note on archived topics.
This topic has been archived. Information and links in this thread may no longer be available or relevant.
If you have a question create a new topic by clicking here, or click on "Post new question" above and select the appropriate board.
Posts: 1
Member Since: ‎04-12-2010
Message 1 of 5 (15,158 Views)

printing from a dos based program with Windows 7

[ Edited ]



We designed a Reservations system in a dos environment back in the eighties .... it is still being used in numerous hotels

..... we have migrate through all the windows platforms.


I know that the NET USE command should be working as it did in XP .... I can not get it to work


we just put in a whole new network with Windows 2008 Server and Windows 7 workstations.  I just installed a new HP Laserjet P4015n .... I am trying to get the following command to work:


     net use lpt1:   \\computername\sharename  /persistent:yes


this does not work ...can anyone help me with this..... The HP can run either networked or via USB shared. 

I really would appreciate some help.. THANK YOU !



Mike Palombo  [text removed for privacy]

0 Kudos
Posts: 29,553
Member Since: ‎11-17-2008
Message 2 of 5 (15,138 Views)

Re: printing from a dos based program with Windows 7

I do not have a Windows 2008 system to test, but in Windows 7 the following cases worked for me:


  1.  Installed a network (TCP/IP) printer on a Windows 7 machine and shared it.  On that Windows 7 machine the following  worked from a DOS prompt run as administrator: Net use LPT1: \\w7name\printershare /persistent:yes  
  2.   Installed the network printer on an XP machine and shared it.  On the Windows 7 machine the net use command worked, but prompted a username and password on the XP machine.


I noted that the NET USE command did not work in either case running from a normal DOS window, it needed to be run from an elevated DOS command (open the command prompt by right clicking and use "Run as Administrator".  In the first case I had an error 66, in the second case the printer share did not show up when running in a normal command window.

If using the elevated command does not work please provide more details of the failure including any error messages you see.

Bob Headrick,  HP Expert

I am not an employee of HP, I am a volunteer posting here on my own time.

If your problem is solved please click the "Accept as Solution" button ------------V

If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

Posts: 1
Member Since: ‎04-02-2012
Message 3 of 5 (12,304 Views)

Re: printing from a dos based program with Windows 7

i HAVE A NEW "HP Deckjet 3050 j610 series" printer on a windows 7 operating system.  I woud like to stream date from old dase programs to the printer.  How???

Posts: 1
Member Since: ‎10-25-2012
Message 4 of 5 (10,518 Views)

Re: printing from a dos based program with Windows 7

We've seen this related to the UAC. We've noticed that when we lower the UAC to Never Notify, we are able to print from command line windows. Of course, this is not something you want to do on a regular basis across your domain's end-points, but it works in a pinch and may point to a better solution.

Honor Student
Posts: 2
Member Since: ‎02-11-2015
Message 5 of 5 (4,685 Views)

Re: printing from a dos based program with Windows 7

Hi Bob,


My environment is Windows7 and a wireless printer "HP ENVY 4500 series (Network)"

This printer does not support LPR.EXE command. How about the "Print" command?


c:\temp\odf\tmp>net use LPT1: \\Peace\TRANG_HP_ENVY_4500_2 /persistent:yes
The command completed successfully.

c:\temp\odf\tmp>Print /D:LPT1 char1.txt
C:\temp\odf\tmp\char1.txt is currently being printed


However, there is no print out, and in the printer queue, there is an entry of "Local DownLevel Document"


Please advice. Thank you very much in advance.


† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation