Programing help ekak one

wishwajith1987

Active member
  • Feb 22, 2015
    237
    124
    43
    oya pahala thiyana code eke lpt1=com1 kiyala thiyana printer eka wenuwata usb printer ekak denna oni meka wenas kara ganne komada

    @echo off
    rem mode lpt1=com1
    rem mode com1:96,n,8,1
     

    imhotep

    Well-known member
  • Mar 29, 2017
    14,823
    8
    35,324
    113
    If you are trying to use a USB printer from a DOS based program, then you can assign the printer to a virtual LPT port. First Share the printer (with the name sharedprinter, lets say), and then use
    net use lpt1: "\computername\sharedprinter" /persistent:yes

    PS: There was a couple of freeware programs like DOS PRINT, DOSPRN which allows you to do this too
     
    Last edited:
    • Like
    Reactions: wishwajith1987

    wishwajith1987

    Active member
  • Feb 22, 2015
    237
    124
    43
    If you are trying to use a USB printer from a DOS based program, then you can assign the printer to a virtual LPT port. First Share the printer (with the name sharedprinter, lets say), and then use
    net use lpt1: "\computername\sharedprinter" /persistent:yes"

    PS: There was a couple of freeware programs like DOS PRINT, DOSPRN which allows you to do this too
    thank you very much I will try this

    If you are trying to use a USB printer from a DOS based program, then you can assign the printer to a virtual LPT port. First Share the printer (with the name sharedprinter, lets say), and then use
    net use lpt1: "\computername\sharedprinter" /persistent:yes

    PS: There was a couple of freeware programs like DOS PRINT, DOSPRN which allows you to do this too
    thank you very much machan mama hadagaththa code eka gahala CMD eke gahala
    ------ Post added on Oct 16, 2021 at 3:47 PM
     
    • Like
    Reactions: imhotep