dos app serial printer issues on xp

S

scott

Hi,

I got a printer working in a com/serial port with dos based software on the
following operating systems by using these commands in autoexec:

windows 98
mode com1:9600,e,8,1

windows 2000
mode com1:9600,n,8,1

With windows XP i cannot get any response from the printer. I tried:

- loading a command prompt
- entering mode /? to see command available
- entering mode com1:9600,n,8,1
- enter "mode" in command prompt to see if it worked (it did)

Still no response from the printer.

Any idea how to print a file to a serial printer on xp ?

Thanks
Scott.
 
N

null

scott said:
Hi,

I got a printer working in a com/serial port with dos based software on the
following operating systems by using these commands in autoexec:

windows 98
mode com1:9600,e,8,1

windows 2000
mode com1:9600,n,8,1

With windows XP i cannot get any response from the printer. I tried:

- loading a command prompt
- entering mode /? to see command available
- entering mode com1:9600,n,8,1
- enter "mode" in command prompt to see if it worked (it did)

Still no response from the printer.

Any idea how to print a file to a serial printer on xp ?

Thanks
Scott.
This works with an LPT port, it might work with a COM port. First, share
the printer, and make note of the computername and the printer's shared
name. Go to a command prompt and type:

net use COM1 /delete
net use COM1 \\computername\printersharename

Exit the command prompt and try it. If it works, then great!

--
-the small one

All postings carry no guarantee or warranty, expressed or implied.
Proceed at your own risk, and perform system and data backups prior to
making changes to your system, and on a regular basis, to protect your
system.
 
S

scott

Hi,

1. I installed a generic txt driver for the printer and printed a test page
which worked. (printer designed for retail environment so i don't think
there is a windows printer driver available for it, but im checking with
epson tech support).

2. I shared the printer and mapped it using "net use" command to LPT1.

3. I then tried the following test from the machine hosting the printer:

copy c:\text.txt LPT1 (access denied error)
copy /a c:\text.txt LPT1 (access denied error)
copy /b c:\text.txt LPT1 (access denied error)

copy c:\text.txt COM1 (1 file copied, but no print out appears)
copy /a c:\text.txt COM1 (1 file copied, but no print out appears)
copy /b c:\text.txt COM1 (1 file copied, but no print out appears)

(where /a is ascii format and /b is binary format).

NOTE:
- printer shared for full access for "everyone".
- when copying to COM1 the windows printer spooler displays file for brief
second.

Any ideas on this basis ?

Thanks
Scott.
 
A

Alex Nichol

scott said:
Got it working when doing the following:

1. start machine
2. run command prompt and enter "mode com1:9600,n,8,1"
3. in command prompt "copy c:\eposp.csv com1" (eposp.csv contain printer
commands).

The problem i have now is how can i get XP to retain the settings "mode
com1:9600,n,8,1" at startup. I tried entering the line into
c:\windows\system32\autoexec.nt but settings were not retained.

Try making a shortcut to cmd.exe (or use the one already in Accessories
as 'Command Prompt'). Right click it, Properties and extend the Target
command line that runs it to be
C:\WIndows\system32\cmd.exe /K mode com1: etc

That loads cmd up, executes the mode command and then keeps the cmd
resident ready to do other commands. IOW putting you ready to do your
step 3

Do a
CMD /?
to see more switches for it and fuller description.

The entry in autoexec.nt might work if you run your program direct from
a shortcut rather than through cmd. But that depends on how the program
is handling the port: If is is through DOS calls, well and good - if as
is only too possible it tries to handle the port hardware direct, XP
will not let it
 
S

scott

Thanks for the response.

I just created a batch file and added it to startup for "all users" with the
line:

mode com1:9600.n.8,1

It seems to work ok at startup. Can you anticipate any problems with this ?

Thanks again.
Scott.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top