DOS programs are still used in the world of business. Advice on how to get them working properly on a modern computing platform is rampant on the Web. Here's what worked for me.
The 16-bit DOS program we need to work with resides on a 32-bit Windows 2003 server that will soon be removed. Until then, a share to the program is mapped on two 32-bit client machines from the primary domain with Group Policy. A shortcut to the .cmd file that fires up the program is placed manually on the clients, also on the primary domain. The program runs well on Windows 8.1. A bit of a compromise to be sure, but the machines will be upgraded to 64-bit Windows 8.1 when the DOS program, which runs from the secondary domain, is retired.
Printing from the program presents the biggest challenge. Two different parallel printers are used with this program, but the program prints to a single port only and there is no option to change this behavior. Need to print a check to the laser printer? It needs to be attached to port LPT1. Need to print a data dump to the dot matrix printer? It needs to be attached to port LPT1 as well. Two people work with this program daily, so we'll use their computers, one for each printer. Let's install the first printer:
-- If the computer has a physical DB-25 (parallel) port you can disable it in the BIOS. Windows 8.1 will not support it and we don't need it.
-- A Cables-to-Go model 16899 USB to DB25 parallel printer adapter is used to connect the printer to the computer. The adapter installs automatically and is not recognized as a parallel device or LPT port.
-- Now open Devices and Printers. Click Add printer and select The printer I want is not listed. At the next dialogue choose Add a local printer or network printer with manual settings and, at the next dialogue, Use an existing port. Select a virtual printer port for USB, either USB001 or USB002, from the list and not the LPT port options.
-- The first printer is a Panasonic KX-P1191 Multi-mode dot matrix printer. The printer is not listed in the dialogue box that asks for a driver and updating the list by clicking Windows Update doesn't help. A check of Panasonic's support site indicates the printer is completely unsupported at this point, but a Panasonic technical support specialist helped puzzle out the trail that led to the Epson FX Series 1(80) driver included with Windows 8.1. It works perfectly.
Now the printer is installed. But it is on port USB001 and the program will only print to port LPT1. The solution is relatively straightforward and can be integrated right into the batch file that is used to start the program. Let's get old school and play a trick on our printer: we'll share it and print to LPT1 that way.
-- Right-click the printer and choosing Properties. Share the printer, do not list it in the directory, create a short share name just for good measure, and then ensure the user of the client machine is listed in the Group or user name area under the Security tab.
-- The two people who will be printing to these printers create my paycheck, so I gave them Domain Admin rights. That may have been unnecessary. Both are users on the primary domain but not the secondary, and I didn't want to spend time troubleshooting the permissions issue.
Now modify the batch file and use the well-documented net use command to implement the printing solution:
::delete the printer
net use lpt1 /delete
::add the printer
net use lpt1 \\COMPUTER\PRINTER /persistent:yes
::fire up the nasty ol' DOS program
existing syntax used to start the program
Where COMPUTER is the name of the computer and PRINTER is the share name of the printer. The procedure worked equally well on a second computer for the HP LaserJet 1100 printer using the "HP LaserJet 1100 (MS)" driver supplied with Windows 8.1.
-------------------- NOTES -------------------
System Error 5:
Ensure the user is listed under the security Tab. "Everyone" can be removed. Are Domain Admin privileges required for the user? Probably not, if everything is running from one domain.
System Error 66:
Check your syntax. You probably misspelled the name of the computer, the printer, or maybe missed the colon? Only one colon is needed, per the Microsoft documentation. Will adding an unnecessary colon to lpt1[:] cause failure?
All about net use: