Announcement

Collapse
No announcement yet.

Printing - Fancy DOS knowledge?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Printing - Fancy DOS knowledge?

    Ok, I have a Printer that does not support DOS printing.

    The printer is connected via USB to MAINCOMPUTER

    I have a DOS based DB program on CLIENTCOMPUTER that needs to print to said printer which is physically attached to MAINCOMPUTER.

    I added the printer to CLIENTCOMPUTER.

    Now what?

    Use mode con to redirect LPT1 somehow?

    As a workaround, i MIGHT be able to dump the output from the DB program to a file somewhere and then print that. But how would I go about doing that?

  • #2
    The problem isn't so much that your printer doesn't support DOS printing, it's that DOS-based applications are notorious for not wanting to print to anyting but an LPT port, some being as anal as to require LPT1 specifically. Obviously a lack of DOS drivers can be a problem, but you can usually get by with a generic driver or one for an older version of your printer that is available for DOS. Finding the one that does the trick will be hit and miss once you actually get the app to print to the USB printer.

    In that regard, what you can try to use "net use lpt1:\\computername\shareprintername /yes" on the CLIENTCOMPUTER.

    Been a long while since I've had to do this, but we used it numerous times at my former employer for various scientific DOS-based applications (and not just for USB printers).
    “And, remember: there's no 'I' in 'irony'” ~ Merlin Mann

    Comment


    • #3
      I don't remember how to do it exactly but there's definitely a way in XP to capture an LPT port and map it to USB for DOS purposes.

      I don't think that it's 100% compatible though. Depends on the DOS app.
      P.S. You've been Spanked!

      Comment


      • #4
        Yeah, I remember doing it all the way to 2k, but damned if I can remember the GUI method of doing it. And yes, support is flakey at best.

        The "net use" command is the DOS equivalent of that capture for network printing. Under the details page (Properties window) for a printer there used to be a capture button, which is no longer present (the tab or the button, at least in name).
        Last edited by Jessterw; 6 March 2006, 23:44.
        “And, remember: there's no 'I' in 'irony'” ~ Merlin Mann

        Comment


        • #5
          Originally posted by Jesterzwild
          In that regard, what you can try to use "net use lpt1:\\computername\shareprintername /yes" on the CLIENTCOMPUTER.
          Just gave this a go...no love.

          Comment


          • #6
            Bummer. Always seems to be hit or miss and any number of things can make it miss. Weren't these things supposed to make our lives easier?
            “And, remember: there's no 'I' in 'irony'” ~ Merlin Mann

            Comment


            • #7
              1) you need to make sure permissions are setup right. Map the printer on the client via the normal method and make sure you can print (I'm sure you've done so, but you always have to cover the basics).

              2) If some form of authentication is required, i.e. a username and password, to acess the printer, the command looks like this:

              net use LPT1: \\<server>\<printer> /USER:<domain>\<user> <password> /PERSISTENT:YES

              There is no flag before the password, just a space after the user name. If you are not on a domain, or your normal domain/workgorup rights gain you print access to the printer, then leave out the /USER: part, or <domain> part, whatever is applicable.

              3) Make sure the computer name and share name have NoSPACES in it and is no longer than 8-character. DOS based programs don't like spaces or long share names.

              4) Slap JW with a large trout for forgetting the /PERSISTENT: before the yes

              The other option is, and I've used this before, to set the print device in the DOS program to the PRN: device ... if available. Then map the network printer in Windows normally and set it to default. When the DOS program sends out the print job to the PRN device, Windows will capture the print job and off it goes.

              Jammrock
              Last edited by Jammrock; 7 March 2006, 08:05.
              “Inside every sane person there’s a madman struggling to get out”
              –The Light Fantastic, Terry Pratchett

              Comment


              • #8
                Originally posted by Jammrock
                1) you need to make sure permissions are setup right. Map the printer on the client via the normal method and make sure you can print (I'm sure you've done so, but you always have to cover the basics).
                Yup.

                2) If some form of authentication is required, i.e. a username and password, to acess the printer, the command looks like this:

                net use LPT1: \\<server>\<printer> /USER:<domain>\<user> <password> /PERSISTENT:YES

                There is no flag before the password, just a space after the user name. If you are not on a domain, or your normal domain/workgorup rights gain you print access to the printer, then leave out the /USER: part, or <domain> part, whatever is applicable.
                Ok

                3) Make sure the computer name and share name have NoSPACES in it and is no longer than 8-character. DOS based programs don't like spaces or long share names.
                I figured that wouldn't matter (it's 9 characters), but I'll certainly try shortening it to 8 chars.

                4) Slap JW with a large trout for forgetting the /PERSISTENT: before the yes
                Well, that will only matter if I want it to work post reboot, right? Omitting the /P should have let it work just for the first try, at least, if all else was right.

                The other option is, and I've used this before, to set the print device in the DOS program to the PRN: device ... if available.
                And how would I go about doing that?

                /QUOTE]Then map the network printer in Windows normally and set it to default. When the DOS program sends out the print job to the PRN device, Windows will capture the print job and off it goes.

                Jammrock[/QUOTE]

                Comment


                • #9
                  DOS2USB software should help You: http://www.dos2usb.com/
                  A CRAY is the only computer that runs an endless loop in just 4 hours...

                  Comment


                  • #10
                    Originally posted by Kooldino
                    I figured that wouldn't matter (it's 9 characters), but I'll certainly try shortening it to 8 chars.
                    Depends on the program... but better safe than sorry.
                    Well, that will only matter if I want it to work post reboot, right? Omitting the /P should have let it work just for the first try, at least, if all else was right.
                    Yes, but if you use /Yes then it may mess the command. There is no /Yes flag for net use ... at least not any more.

                    And how would I go about doing that?
                    Must be done from inside the DOS software. If you don't know the command, or the DOS GUI doesn't have an option to change the printer settings, then you can't.

                    ...and make suer there is a space between LPT1: and \\<server>\<share>


                    Jammrock
                    “Inside every sane person there’s a madman struggling to get out”
                    –The Light Fantastic, Terry Pratchett

                    Comment


                    • #11
                      Originally posted by Nicram
                      DOS2USB software should help You: http://www.dos2usb.com/
                      That looks perfect! If the methods in this thread end up not working, I'll go with this!

                      Comment


                      • #12
                        Update:

                        1-DOS2USB didn't do jack.

                        2-The "net use LPT1: \\<server>\<printer> /USER:<domain>\<user> <password> /PERSISTENT:YES" command only kind of worked.

                        It made it so that I could do a "type blah.txt > lpt1" and make it print to whatever printer I wanted it to, but the DOS program (DBASE4) that I need to print to the network printer refused to print. Mind you, with the exact same program settings, it would work on a win98 machine.

                        Do I have any other alternatives?

                        I was thinking VMware, but I don't have any experience with it.

                        I just need to find SOME way to be sitting in front of an XP machine and make it so that I can print from DBASE4.

                        Anyone?

                        Comment


                        • #13
                          I am a bit rusty on this, but I am assuming a dos based program used in win2k/xp

                          Its something like, add a network printer on the client, in the properties for that setup caputure printer port lpt1 which connects to the networkd printer on the main computer.

                          I know it does work , I just have not done it for a long time (and I am happy about that )

                          Comment


                          • #14
                            ^
                            THat only works in 98.

                            Comment


                            • #15
                              Marshmallow, that's what the NET USE command does.

                              I know that some DOS programs have built in printer drivers ... anyway, is there a DOS GUI to DBASE 4? Is there any place to look at the printer setup for the program from with the program?
                              “Inside every sane person there’s a madman struggling to get out”
                              –The Light Fantastic, Terry Pratchett

                              Comment

                              Working...
                              X