net use lpt1: w/USB printer


  • My system does not have a parallel port. I connected my USB printer. From a command prompt I issue a net use lpt1: command. This works when I try for example dir > lpt1: or type filename > lpt1: from a command prompt.

    BUT: My software (DOS app written in MS QuickBasic) has lpt1: hard coded and when I try to print from the software I get a printer error message "device fault" even with net use lpt1 in effect.

    This procedure has worked well on XP and prior versions.


    Any suggestions will be greatly appreciated.



    Tuesday, June 19, 2007 7:15 PM


All replies

  • Try running your application in compabililty mode and see if that solves your issue.
    Wednesday, June 27, 2007 8:49 PM
  • Same problem here,


    Using DOS program under Vista 32bit.

    Printing from dos application to shared printer installed on usb (with net use lpt1: \\computername\printername /y) worked perfect under XP, since vista not at all.


    Sharing is ok in cmd-prompt (run as admin), but when printing from dos program or in cmd-prompt I receive the error:

    "can't initialize PRN device"


    Running in compatibility mode doesn't solve anything....


    Please help.

    Wednesday, April 09, 2008 11:24 AM
  • Hi,


    This forum is for software developers to get their applications compatible with Vista.


    However please provide the exact steps that you are following to print from the DOS program.



    Wednesday, April 16, 2008 1:25 PM

    qbasic application will not print to USB attached printer under Visa, but CMD window will print to USB attached printer


    Using Windows XP:

    1) Share the USB attached printer

    2) net use lpt1: \\computer\printer

    3) Print successful


    Using Vista

    1) Share the USB attached printer

    2) net use lpt1: \\computer\printer from a CMD prompt that is running as Administrator

    3a) Print from DOS window successful (for example, dir > lpt1: works properly and spools to the printer)

    3b) Print from qbasic application not successful (cannot find printer)


    Any ideas?  It appears that the net use lpt1 under Vista is not comprehensive.




    Tuesday, October 07, 2008 2:26 PM
  • Answer --

    Pool the printer ports.

    Select both the USB & the LPT1 ports as pooled ports.

    Windows will attempt to print to whichever printer is available.  Since LPT1 is not available, the print job is spooled to USB instead.

    --Mark Satterfield
    Saturday, December 27, 2008 7:11 AM
  • I have also the same problem

    Thank you very much for the information, but how can I Pool the printer ports ?

    What must I do exactly ? 

    Thank you very much.

    Pool the printer ports.

    Select both the USB & the LPT1 ports as pooled ports.
    • Proposed as answer by HendryRae Thursday, March 27, 2014 11:48 PM
    • Unproposed as answer by HendryRae Thursday, March 27, 2014 11:49 PM
    Tuesday, January 06, 2009 3:36 PM
  • Did you share the printer in Properties?


    For Qbasic also go to the Processor Setting in Advanced Tab and select Text instead of LEMF



    Wednesday, October 13, 2010 3:33 AM
  • Really useful tip for WinXP Mark!!! Print sucessful!!! Tnx!!!




    Tuesday, October 01, 2013 1:49 PM