Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dos Serial Printing in XP

Status
Not open for further replies.

thanny

IS-IT--Management
Sep 27, 2002
9
0
0
CA
We have a custom DOS POS that is hard coded to print to a serial receipt printer. Under Win98, we of course used the MODE COMx: 9600,n,8,1 line in the autoexec.bat file.

We are currently in the process of upgrading the network to XP Pro, and under our test environment, we cannot get the serial printers to work. This is what we have tried.

Placing the Mode statement in the batch file that loads the program, putting it in the autoexec.nt file and finally putting it in the login script. All have failed. I was hoping someone else may have come across this situation and could provide some direction.

Thanks
 
If it is a custom POS program and it is working why not stay with 98? Have you tried to capture the printer port in the printer setup?
 
Start, Printers and Faxes, File, Server Properties, Port, highlight COM1 and click the "Configure Ports" button.
 
Love to stick to 98, but we can't (long story). Just configuring the ports in XP does not work. I either have to get the MODE command to work for that particular session of DOS or replace all of our serial receipt printers with parallel ones (which is the best option but more costly).

Thanks for the replies.
 
Tell me what happens when you use the Port Configuration feature of XP, under the Printer and Fax Wizard, Server Properties.

You might check that no virutalization driver has been installed on your COM ports. Many PDA syncronization software, as well as GPS devices and other things redo the drivers set for the serial ports.

In the alternative, have you tried using Device Manager? right-click the COM port, Properties, Port Settings.

Finally, the Mode command works perfectly well under XP. Consider using either Group Policy to create a "Startup" .bat or .cmd file using the Mode command, or using Task Scheduler to schedule "at Logon" a similar .bat or .cmd script.
 
I have no way of testing this, but is it possible to create a batch file that contains something like the following:

MODE COMx: 9600,n,8,1
Start /b "c:\mydir\myfile.exe"

This will set the mode as required and then launch your application using this environment


Greg Palmer
Free Software for Adminstrators
 
Thanks for all they great suggestions. So far nothing has worked. Going to order in a parallel receipt printer which should work just fine and dandy (according to the software developers).

As usual, 1 upgrade leads to another, then another and then another just to get everything working correctly.
 
thanny,

Barring my earlier reservation that a device driver (common with PDA synch software, GPS and other things) there is no darn reason the steps suggested above should not allow you to set the serial port properties under XP.

I would like you to consider the possibility the device itself is at fault, as I honestly believe the OS can, and should have, handled this device property specification without any particular tricks.

I am sorry neither user Server Properties under the Printer and Fax Wizard, nor Device Manager was able to resolve your issue. But I honestly do not think this an OS issue. I think it is a hardware issue.

Best,
Bill Castner
 
Since the printers work fine under 98 but not under XP, I tend to think that the problem lies more with the custom application than anything.

I can copy a text file to the printer ok, I just cannot get the custom application to print to it in XP. My next step before doing anything else is to take a completely different system with a different chipset to test with. If that fails, we will be most likely purchasing parallel printers unless the Vendor can provide a fix.

 
I am not sure a chipset change will help. What can help is to define the printer as a local printer. Then share it. Then in your program you can:

net use lpt1: \\share_server_name\shared_printer_name

Two thoughts:

. The above process Bruce Sanderson, MS-MVP explains in Step #2 in more detail:

. for non-administrator users, you need to use Devcon.exe to allow the use of lpt1. If your program can accept lpt2 or other assignments, ignore the following:

If your program uses "PRN" or "LPT1", the non-administrative user needs to run a simple batch file. (Download devcon.exe from the MSFT link above and place in c:\windows\system32):

***** start of printer_enable.bat
devcon disable *PNP0401
net use lpt1: //printer_server_name/name_of_shared_serial_printer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top