Biden PC's Small Business IT Blog


Print From a DOS Application

Recently I was asked how to make a DOS application print from Windows Vista or XP if there is no Parallel Port. This is actually quite easy and takes only a few simple steps.
  1. Install the printer on another printer and make sure it prints.
  2. Share the printer and note the computer-name and printer's share-name.
  3. On the printer that has the DOS program, create a batch file that looks like this:
net use lpt1 /delete
net use lpt1 \\pc-name\printer-name
c:\folder\dos-application

Now in Windows XP, all you have to do is run the batch file and it works.

With Windows Vista, there is a slight catch. when you run it, you may not get anything or you may get an error that asks you for a password. If either of these happen to you:
  1. close it out and go back to where the batch file is located.
  2. Right-click on the batch file and choose "Run As Administrator".
  3. You can now run the program and print to LPT1.
If you need to print to LPT2 instead of LPT1, simply change the commands in the batch file to sat LPT2.

Happy computing,
Tim

Labels: , , ,

DiggIt! Del.icio.us

Responses to “Print From a DOS Application”

Post a Comment



© 2008 Biden PC Small Business IT Blog

No part of this blog may be reproduced without written permission from Biden PC.