Отвечено net use lpt1: w/USB printer

  • Tuesday, June 19, 2007 7:15 PM
     
     

    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.

     

    Arnold

All Replies

  • Wednesday, June 27, 2007 8:49 PM
     
     Answered
    Try running your application in compabililty mode and see if that solves your issue.
  • Wednesday, April 09, 2008 11:24 AM
     
     

    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 16, 2008 1:25 PM
     
     

    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.

    Thanks

    Saswati

  • Tuesday, October 07, 2008 2:26 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.

     

    --Mark

     

    http://www.marksatterfield.com

  • Saturday, December 27, 2008 7:11 AM
     
     Proposed
    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

    http://www.marksatterfield.com


    http://www.marksatterfield.com
  • Tuesday, January 06, 2009 3:36 PM
     
     
    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.
  • Wednesday, October 13, 2010 3:33 AM
     
     

    Did you share the printer in Properties?

     

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

     

    Ted