Sign in with
Sign up | Sign in
Your question

VBDOS program doesn't print from DOS window in XP

Last response: in Windows XP
Share
Anonymous
September 14, 2005 8:25:21 PM

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.
Anonymous
September 14, 2005 8:25:22 PM

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..
September 14, 2005 9:35:09 PM

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
Related resources
September 14, 2005 10:58:23 PM

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
September 15, 2005 11:13:27 AM

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
Anonymous
September 15, 2005 6:33:29 PM

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
Anonymous
September 15, 2005 7:37:32 PM

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
Anonymous
September 17, 2005 8:39:02 PM

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
September 17, 2005 8:39:03 PM

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:D ghdbm$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
Anonymous
September 17, 2005 8:39:37 PM

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
Anonymous
September 17, 2005 8:39:44 PM

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
Anonymous
September 17, 2005 8:39:51 PM

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
Anonymous
September 17, 2005 8:41:25 PM

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:D ghdbm$46e$1@newsg4.svr.pol.co.uk...

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

Mike
!