Can't print from dos

We have network with 2008R2 server, and are still using an old dos program that we must print from. By using the net use command we have been printing fine to a Microline dot matrix and two Brother 1440's although the 1440's had to had to be routed through an XP workstation because server 2008 doesn't support them. We recently upgraded one printer to an HP laserjet which is supported.

What changed is that I took the newer printer off the workstation and connected to the server via USB and shared from there. It installed fine, and I re-installed it on the workstations and set it up with the net use command. Prior to moving it, the other workstations were able to print to it from the dos program. All workstations are running XP pro, 32 bit, the server is 64 bit.

HP recommended newest drivers and an installation sequence, which I followed, for mixed 32 - 64 bit environments.

We can print to it from any Windows program on any workstation. However, only one workstation will print to it out of dos using the net use command, the others are not connecting from dos, although they are configured the same, as near as I can tell. I'm missing something.

I've compared the workstation configurations in the dos program. I even used the logon that works, to try to print on different machines, but it only prints from the one machine, so it appears to be specific to the machine and not the program.

I did notice that the printing machine has the older dotnet 1.1 installed and another doesn't. Maybe dos printing requires the older dotnet??

I can use a dos print command to print from any workstation, but I think that is still just a Windows function. (print /d:\\printserver\printer c:\path\file)

I'm not finding any answers at MS support. Any dos gurus out there?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steven CarnahanNetwork ManagerCommented:
Are you printing ASCII (text) files?  If so then I would try this:

wordpad /pt <filename> <printername>

How was it setup with the NET USE command? Did you try to direct the printer directly to the print switch, or printer, or did you go through a shared printer on one of the network computers?

A way to check:

When you get into the CMD: prompt, and type  NET USE

What is the response?

I have a BAT file I run once at startup on each computer that needs to print to LPT1: from DOS (old programs,  you're right) and they all work, even through a multi-port print server.

I'd be inclined to think this is NOT a driver issue, it's a redirection issue.

On my system, NET USE redirects LPT1: to a computer with a shared printer name (even though the printer is not directly connected to that computer, the key is to share the printer on some computer, and setup the NET USE LPT1: to point to that computer with that shared printer name.

I run through a print server, and then setup LPT2: to go directly to another network printer, and old DOS programs (they are still useful at times) print to LPT1 or LPT2 with no problems. But the NET USE has to be correct.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FarpointCAuthor Commented:
I agree that it must be a redirection issue, rather than a driver issue. I'll try your suggestion.
Need More Insight Into What’s Killing Your Network

Flow data analysis from SolarWinds NetFlow Traffic Analyzer (NTA), along with Network Performance Monitor (NPM), can give you deeper visibility into your network’s traffic.

FairpointC - I had an e-mail prepared for someone else with a similar issue (not on EE) and edited it a bit
to post here. It assumes you haven't tried NET USE, pardon that part, but take a look at the entire solution:

This may seem like an odd suggestion, but it works.

The goal is to assign LPT1: to your DOS printer, and print to LPT1:

Here's a sample command in a BAT file that you can run every time
you reboot your windows computer:


1. In this example, the computer is named DAVE-1
2. The printer share name is "NETLPT"

The shared printer can be on the local computer, and while it seems odd to have a network share on a local computer to be used by the local computer, this works. But it also works for other computers on your network that want to print to your shared DOS printer.

You can do some testing once the Computer name and Share name is known:

Get to the CMD: prompt

Type  "NET USE" to see what's already setup
Then try "NET USE LPT1: [computer name offering up the shared printer]\[the share name]

where my computer is JTWINXP and the printer is shared as "SAMSUNG1"

Then type "NET USE" to check that the assignment of LPT1: is going to the network printer.
Then try doing a directory to the printer, e.g.

To disconnect the share, use  NET USE LPT1: /D
But I don't disconnect it, once it's assigned this way, it just works.

This works, I've used it, and have setup other systems that need to print from DOS to a
printer compatible with DOS type printout, most seem to honor EPSON printer codes.


PS: The printer does not need to be physically connected to any system, it can be a network printer, or a printer connected to a print server, as long as a machine can use it, it can share it.
FarpointCAuthor Commented:
Actually the net use command has a persistent switch which I use to keep the connection alive through reboots.

The answer was that I was running the command prompt as the administrator, which is required on many settings changes on a domain, but not this one. It mapped the printer on the administrator account. I had to run the command prompt from the local user account and it mapped the printer just fine. I found out through through the suggestion by JT92677, thanks Jeff. I didn't know you could review mappings with that command.
I don't use the persistent switch it isn't necessary if the assignment is done with a bat or cmd file.  Also you can distribute the bat file for anyone who needs dos printing without having to assign the mapping at each workstation that may or may not need dos print support.

Glad something I suggested worked.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.