• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

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?

  • 3
  • 2
1 Solution
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.

FarpointCAuthor Commented:
I agree that it must be a redirection issue, rather than a driver issue. I'll try your suggestion.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.


Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now