VBDOS program doesn't print from DOS window in XP

G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

I have a legacy program written in VBDOS that runs in a DOS window.
One of my customers using Windows XP can't print. The attempt to print
just hangs the DOS window.

The internal code is like
OPEN "O", #1, "PRN"
PRINT #1, etc.

It has printed from windows 98 and 2000. Could it be windows XP
related?

It is not practical to change the program. (The program seems to work
well in XP otherwise.)

What could be the problem?

Help will be appreciated.
 
G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Stan Hilliard" <usenetreplyMS@samplingplansNOTSPAM.com> wrote in message
news:gq3hi1934tl3d9tf1v7aeqm0b6hpia63p6@4ax.com...
>I have a legacy program written in VBDOS that runs in a DOS window.
> One of my customers using Windows XP can't print. The attempt to print
> just hangs the DOS window.
>
> The internal code is like
> OPEN "O", #1, "PRN"
> PRINT #1, etc.
>
> It has printed from windows 98 and 2000. Could it be windows XP
> related?
>
> It is not practical to change the program. (The program seems to work
> well in XP otherwise.)
>
> What could be the problem?
>
> Help will be appreciated.

Is it a networked printer?... or maybe a USB printer? According to "Dir
Help", you can use the following command to send a directory listing to a
printer....

dir > prn

All printers connected here are networked. That command just causes the dos
window to sit and spin since there's nothing connected to LPT1. It doesn't
cause it to hang though.... depending on what your definition of "hangs the
DOS window" is, I suppose <g>

So.... you might try asking that customer to open a dos window and type the
Dir > PRN command to see if anything shows up on the printer.

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
 

Ralph

Distinguished
Apr 3, 2004
183
0
18,680
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Stan Hilliard" <usenetreplyMS@samplingplansNOTSPAM.com> wrote in message
news:gq3hi1934tl3d9tf1v7aeqm0b6hpia63p6@4ax.com...
> I have a legacy program written in VBDOS that runs in a DOS window.
> One of my customers using Windows XP can't print. The attempt to print
> just hangs the DOS window.
>
> The internal code is like
> OPEN "O", #1, "PRN"
> PRINT #1, etc.
>
> It has printed from windows 98 and 2000. Could it be windows XP
> related?
>
> It is not practical to change the program. (The program seems to work
> well in XP otherwise.)
>
> What could be the problem?
>
> Help will be appreciated.


You need to set up a "DOS Printer" or LPT1:
For networked printers use...
net use LPT1:\\My_Server\Printer
There are various administrative setups that deny certain ports or config
ability.
Get more information from the XP help (Startup->Help).

hth
-ralph
 

miked

Distinguished
Jun 10, 2004
67
0
18,630
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Stan Hilliard" <usenetreplyMS@samplingplansNOTSPAM.com> wrote in message
news:gq3hi1934tl3d9tf1v7aeqm0b6hpia63p6@4ax.com...
>I have a legacy program written in VBDOS that runs in a DOS window.
> One of my customers using Windows XP can't print. The attempt to print
> just hangs the DOS window.
>
> The internal code is like
> OPEN "O", #1, "PRN"
> PRINT #1, etc.
>
> It has printed from windows 98 and 2000. Could it be windows XP
> related?
>
> It is not practical to change the program. (The program seems to work
> well in XP otherwise.)
>
> What could be the problem?


With every new version of Windows, you can expect less and less support for
16 bit apps. You're talking about a DOS app (which WinXP probably suppports
even less than a 16 bit Windows app). It wouldn't surprise me at all that a
DOS app can't print, let alone "see" some printers, particularly newer
printers that use USB. You say it has printed from Win98 and Win2000. On
these systems, what kind of printer is installed? Is this a network printer
and are these Win98 and Win2000 systems on the same network and using the
same printer as the WinXP system that won't print?

IMO, there's no reason to expect a DOS program to work 100% under WinXP. You
might be able to work-around things, but it's probably trial and error and
hacks at best.

--
Mike
Microsoft MVP Visual Basic
 

Ralph

Distinguished
Apr 3, 2004
183
0
18,680
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"MikeD" <nobody@nowhere.edu> wrote in message
news:udVzK$XuFHA.3720@TK2MSFTNGP14.phx.gbl...
>
> "Stan Hilliard" <usenetreplyMS@samplingplansNOTSPAM.com> wrote in message
> news:gq3hi1934tl3d9tf1v7aeqm0b6hpia63p6@4ax.com...
> >I have a legacy program written in VBDOS that runs in a DOS window.
> > One of my customers using Windows XP can't print. The attempt to print
> > just hangs the DOS window.
> >
> > The internal code is like
> > OPEN "O", #1, "PRN"
> > PRINT #1, etc.
> >
> > It has printed from windows 98 and 2000. Could it be windows XP
> > related?
> >
> > It is not practical to change the program. (The program seems to work
> > well in XP otherwise.)
> >
> > What could be the problem?
>
>
> With every new version of Windows, you can expect less and less support
for
> 16 bit apps. You're talking about a DOS app (which WinXP probably
suppports
> even less than a 16 bit Windows app). It wouldn't surprise me at all that
a
> DOS app can't print, let alone "see" some printers, particularly newer
> printers that use USB. You say it has printed from Win98 and Win2000. On
> these systems, what kind of printer is installed? Is this a network
printer
> and are these Win98 and Win2000 systems on the same network and using the
> same printer as the WinXP system that won't print?
>
> IMO, there's no reason to expect a DOS program to work 100% under WinXP.
You
> might be able to work-around things, but it's probably trial and error and
> hacks at best.
>
> --
> Mike
> Microsoft MVP Visual Basic
>
>

To amplify "DOS" command line commands are not even supported on 64-bit
Windows. I don't know if this is just part of the 'prototype' or if it is a
sign of things to come.

-ralph
 
G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

On Wed, 14 Sep 2005 16:25:21 -0500, Stan Hilliard wrote:

> I have a legacy program written in VBDOS that runs in a DOS window.
> One of my customers using Windows XP can't print. The attempt to print
> just hangs the DOS window.
>
> The internal code is like
> OPEN "O", #1, "PRN"
> PRINT #1, etc.
>
> It has printed from windows 98 and 2000. Could it be windows XP
> related?
>
> It is not practical to change the program. (The program seems to work
> well in XP otherwise.)
>
> What could be the problem?
>
> Help will be appreciated.

It works for me, XP Home SP2, HPLJ1100 on network print server mapped as
LPT1

I'd be interested in exactly what printer this is going to. Perhaps it's
more of a printer issue than an OS issue.

--
HK
 
G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

On Thu, 15 Sep 2005 07:13:27 -0500, Ralph wrote:

> "MikeD" <nobody@nowhere.edu> wrote in message
> news:udVzK$XuFHA.3720@TK2MSFTNGP14.phx.gbl...
>>
>> "Stan Hilliard" <usenetreplyMS@samplingplansNOTSPAM.com> wrote in message
>> news:gq3hi1934tl3d9tf1v7aeqm0b6hpia63p6@4ax.com...
>>>I have a legacy program written in VBDOS that runs in a DOS window.
>>> One of my customers using Windows XP can't print. The attempt to print
>>> just hangs the DOS window.
>>>
>>> The internal code is like
>>> OPEN "O", #1, "PRN"
>>> PRINT #1, etc.
>>>
>>> It has printed from windows 98 and 2000. Could it be windows XP
>>> related?
>>>
>>> It is not practical to change the program. (The program seems to work
>>> well in XP otherwise.)
>>>
>>> What could be the problem?
>>
>>
>> With every new version of Windows, you can expect less and less support
> for
>> 16 bit apps. You're talking about a DOS app (which WinXP probably
> suppports
>> even less than a 16 bit Windows app). It wouldn't surprise me at all that
> a
>> DOS app can't print, let alone "see" some printers, particularly newer
>> printers that use USB. You say it has printed from Win98 and Win2000. On
>> these systems, what kind of printer is installed? Is this a network
> printer
>> and are these Win98 and Win2000 systems on the same network and using the
>> same printer as the WinXP system that won't print?
>>
>> IMO, there's no reason to expect a DOS program to work 100% under WinXP.
> You
>> might be able to work-around things, but it's probably trial and error and
>> hacks at best.
>>
>> --
>> Mike
>> Microsoft MVP Visual Basic
>>
>>
>
> To amplify "DOS" command line commands are not even supported on 64-bit
> Windows. I don't know if this is just part of the 'prototype' or if it is a
> sign of things to come.
>
> -ralph

Currently XP (32bit) emmulates DOS, XP64 does not. I strongly suspect that
this will not change. Solutions abound however with virtualization. Some
time ago MS bought VirtualPC. I would not be at all surprised to find that
in the future, DOS support will come through this scenario. It may require
an additional purchase, or MS might just bundle a very lite version for
legacy support.

--
HK
 
G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Ralph" <nt_consulting64@yahoo.com> wrote in message
news:XeOdnRIPeqBUsLHeRVn-tQ@arkansas.net...

> Could you clarify what you mean by a "DOS" or "Window-Only" printer?

Some printers, even printers that connect through a standard parallel port,
(many of the HP Deskjet range, for example) will only work properly when
addressed through their own printer drivers, which by and large means that
they are effectively "page printers" that need the appropriate Windows (or
other) printer driver to produce an output. There is nothing you can do to
them (hardware wise) to get them to accept simple "old fashioned" Ascii
codes and control codes to print text in the old fashioned way.

Mike
 

Ralph

Distinguished
Apr 3, 2004
183
0
18,680
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Mike Williams" <Mike@WhiskyAndCoke.com> wrote in message
news:dghdbm$46e$1@newsg4.svr.pol.co.uk...
> "Ralph" <nt_consulting64@yahoo.com> wrote in message
> news:XeOdnRIPeqBUsLHeRVn-tQ@arkansas.net...
>
> > Could you clarify what you mean by a "DOS" or "Window-Only" printer?
>
> Some printers, even printers that connect through a standard parallel
port,
> (many of the HP Deskjet range, for example) will only work properly when
> addressed through their own printer drivers, which by and large means that
> they are effectively "page printers" that need the appropriate Windows (or
> other) printer driver to produce an output. There is nothing you can do to
> them (hardware wise) to get them to accept simple "old fashioned" Ascii
> codes and control codes to print text in the old fashioned way.
>
> Mike
>

OK. You mean USB Printers will have difficultiy in supporting some kinds of
'direct' printing. But as the console inherently supports "Windows printing"
this should ever be a problem in normal practice.

thanks,
-ralph
 
G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Ralph" <nt_consulting64@yahoo.com> wrote in message
news:XeOdnRIPeqBUsLHeRVn-tQ@arkansas.net...

> Could you clarify what you mean by a "DOS" or "Window-Only" printer?

Some printers, even printers that connect through a standard parallel port,
(many of the HP Deskjet range, for example) will only work properly when
addressed through their own printer drivers, which by and large means that
they are effectively "page printers" that need the appropriate Windows (or
other) printer driver to produce an output. There is nothing you can do to
them (hardware wise) to get them to accept simple "old fashioned" Ascii
codes and control codes to print text in the old fashioned way.

Mike
 
G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Ralph" <nt_consulting64@yahoo.com> wrote in message
news:XeOdnRIPeqBUsLHeRVn-tQ@arkansas.net...

> Could you clarify what you mean by a "DOS" or "Window-Only" printer?

Some printers, even printers that connect through a standard parallel port,
(many of the HP Deskjet range, for example) will only work properly when
addressed through their own printer drivers, which by and large means that
they are effectively "page printers" that need the appropriate Windows (or
other) printer driver to produce an output. There is nothing you can do to
them (hardware wise) to get them to accept simple "old fashioned" Ascii
codes and control codes to print text in the old fashioned way.

Mike
 
G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Ralph" <nt_consulting64@yahoo.com> wrote in message
news:XeOdnRIPeqBUsLHeRVn-tQ@arkansas.net...

> Could you clarify what you mean by a "DOS" or "Window-Only" printer?

Some printers, even printers that connect through a standard parallel port,
(many of the HP Deskjet range, for example) will only work properly when
addressed through their own printer drivers, which by and large means that
they are effectively "page printers" that need the appropriate Windows (or
other) printer driver to produce an output. There is nothing you can do to
them (hardware wise) to get them to accept simple "old fashioned" Ascii
codes and control codes to print text in the old fashioned way.

Mike
 
G

Guest

Guest
Archived from groups: microsoft.public.vb.general.discussion,microsoft.public.vb.dos,microsoft.public.windowsxp.help_and_support (More info?)

"Mike Williams" <Mike@WhiskyAndCoke.com> wrote in message
news:dghdbm$46e$1@newsg4.svr.pol.co.uk...

.. . . sorry about the multiple postings. Bit of a hiccup this end :-(

Mike