General discussion

  • Creator
    Topic
  • #2307371

    Can I print in DOS through TCP/IP?

    Locked

    by jasonbis ·

    I have windows 2000 and XP computers on a network. I set up the network printers by using a standard tcp/ip port and assigning all the printers ip addresses. Everything works great expect older applications in dos that want to print to lpt1. I need to find a way to have the dos application send the data to the networked printer or at least have it redirected there. We used to use the novell print capture feature when we have the printer set up through NDPS but that is no longer and I need to get it to work through tcp/ip somehow. Any ideas???

All Comments

  • Author
    Replies
    • #2745657

      Reply To: Can I print in DOS through TCP/IP?

      by jschein ·

      In reply to Can I print in DOS through TCP/IP?

      The only way is to have a pc that is sharing the printer or a print share device hooked into it. Then you would just use:

      Use the net.exe command to establish a persistent connection. To do this, use the following syntax at a command prompt
      net use lptx \\printserver\sharename /persistent:yes

      where x is the number of the printer port that you want to map, where printserver is the print server sharing the printer, and where sharename is the name of the printer share.

      For example, to map LPT2 to a printer shared as Laser1 on a print server named Pserver, follow these steps:
      Click Start, and then click Run.
      In the Open box, type cmd, and then click OK.
      Type net use lpt2 \\pserver\laser1 /persistent:yes, and then press ENTER.
      To quit the command prompt, type exit, and then press ENTER.

      So… Recapping… Share the printer on pc (pc named computer1 and share the printer as printer1)

      Create yourself a batch file on the computer using dos and make sure it is in the startup. The batch file should say:

      net use lpt1 \\computer1\printer1 /persistent:yes

      that’s all there is to it.

      Good luck.

      • #2741780

        Reply To: Can I print in DOS through TCP/IP?

        by jschein ·

        In reply to Reply To: Can I print in DOS through TCP/IP?

        “So far all I have seen are answers that have to do with setting up a dedicated print server with a share name. This is not an option. We need to have the data redirected to a network printer through tcp/ip. Not through a share name or dedicated print server. I have found a program called Dosprn that is supposed to allow this type of printing but so far I haven’t been able to get it to work either.”

        The reason that this is all you see is this is all you can do for a DOS program trying to print to LPT1 …

      • #2741979

        Reply To: Can I print in DOS through TCP/IP?

        by jasonbis ·

        In reply to Reply To: Can I print in DOS through TCP/IP?

        Poster rated this answer.

    • #3378525

      Reply To: Can I print in DOS through TCP/IP?

      by jaboy78 ·

      In reply to Can I print in DOS through TCP/IP?

      just create a batch file and put it on the startup folder

      on the batch files, put net use lpt1 \\printercomputername\printersharedname

      note* – make sure that workstation dont have any printer connected to the lpt1.

    • #3378279

      Reply To: Can I print in DOS through TCP/IP?

      by tpcosmo ·

      In reply to Can I print in DOS through TCP/IP?

      jschein@mailcity.com has got it dead on.

      The only thing I could add, is that you can even include the command in your logon script, to map the port without running a seperate .BAT file.
      I have an OLD dos application I support, and thats the way I do it, and it works great.

      Good Luck…

    • #2744355

      Reply To: Can I print in DOS through TCP/IP?

      by curacao_dejavu ·

      In reply to Can I print in DOS through TCP/IP?

      remember,
      since it is dos the sharedname of the printer has to be 8 characters or less, no spaces and weird characters else the mapping in dos won’t work.

      the rest is alreay answered
      Leopold

    • #2744320

      Reply To: Can I print in DOS through TCP/IP?

      by jasonbis ·

      In reply to Can I print in DOS through TCP/IP?

      So far all I have seen are answers that have to do with setting up a dedicated print server with a share name. This is not an option. We need to have the data redirected to a network printer through tcp/ip. Not through a share name or dedicated print server. I have found a program called Dosprn that is supposed to allow this type of printing but so far I haven’t been able to get it to work either.

    • #2741732

      Reply To: Can I print in DOS through TCP/IP?

      by tscott ·

      In reply to Can I print in DOS through TCP/IP?

      If you are using standard TCP/IP printing on the print server, i.e. LPR printing, you can use the following command from DOS prompt to print a file.

      C:\>lpr

      Sends a print job to a network printer

      Usage: lpr -S server -P printer [-C class] [-J job] [-o option] [-x] [-d] filename

      Options:
      -S server Name or ipaddress of the host providing lpd service
      -P printer Name of the print queue
      -C class Job classification for use on the burst page
      -J job Job name to print on the burst page
      -o option Indicates type of the file (by default assumes a text file)
      Use “-o l” for binary (e.g. postscript) files
      -x Compatibility with SunOS 4.1.x and prior
      -d Send data file first

      C:\>

    • #2741978

      Reply To: Can I print in DOS through TCP/IP?

      by jasonbis ·

      In reply to Can I print in DOS through TCP/IP?

      This question was closed by the author

Viewing 6 reply threads