16 bit DOS in vista, change of kyeboard layout and loosing icons

G

Guest

In Vista Business (Danish) I have following problems with some old 16 bit Dos
programs:

- They can't run in fullscreen mode (but this is a well known Vista
limitation so newer mind)
- Can't show the correct icon even if you in properties for the exe attach
an icon manually. But if you start the exe via an cmd file (creating an .cmd
file with the path and exe in and makes a shortcut for the .cmd file) then
you can attach an icon and it shows as expected.
- But worst: The keyboard layout changes to EN US when the program starts
(remember I am on a danish mashine). If I start an cmd prompt the layout is
still danish, when I start the program whithin the prompt it changes to EN US
but changes back to danish when ending the program. This is not an issue on
win xp or win98 - have really played a lot around with it!

Any ideas out there !!

Regards Thostrup, denmark
 
S

Synapse Syndrome

Thostrup said:
In Vista Business (Danish) I have following problems with some old 16 bit
Dos
programs:

- They can't run in fullscreen mode (but this is a well known Vista
limitation so newer mind)
- Can't show the correct icon even if you in properties for the exe attach
an icon manually. But if you start the exe via an cmd file (creating an
.cmd
file with the path and exe in and makes a shortcut for the .cmd file) then
you can attach an icon and it shows as expected.
- But worst: The keyboard layout changes to EN US when the program starts
(remember I am on a danish mashine). If I start an cmd prompt the layout
is
still danish, when I start the program whithin the prompt it changes to EN
US
but changes back to danish when ending the program. This is not an issue
on
win xp or win98 - have really played a lot around with it!


If you cannot get it working, two alternatives to using CMD, are either
installing Win9x/2000/XP on VirtualPC and running it from that, or using
DOSBox.

http://dosbox.sourceforge.net/

ss.
 
S

Synapse Syndrome

Thostrup said:
In Vista Business (Danish) I have following problems with some old 16 bit
Dos
programs:

- They can't run in fullscreen mode (but this is a well known Vista
limitation so newer mind)
- Can't show the correct icon even if you in properties for the exe attach
an icon manually. But if you start the exe via an cmd file (creating an
.cmd
file with the path and exe in and makes a shortcut for the .cmd file) then
you can attach an icon and it shows as expected.
- But worst: The keyboard layout changes to EN US when the program starts
(remember I am on a danish mashine). If I start an cmd prompt the layout
is
still danish, when I start the program whithin the prompt it changes to EN
US
but changes back to danish when ending the program. This is not an issue
on
win xp or win98 - have really played a lot around with it!


Actually, installing the Danish version of MS-DOS on VirtualPC might be the
neatest answer, if you have the disks.

ss.
 
C

Chen Shen

You could try setting your language settings to be system wide default
rather than merely for your user...

Regional and Language Options -> Administrative -> under Reserved accounts
"Copy to reserved accounts..."
 
A

Andrew McLaren

Hej Thostrup,

Hvordan har du det? (Undskyld! Jeg kan ikke dansk).
- Can't show the correct icon even if you in properties for the exe attach
an icon manually. But if you start the exe via an cmd file (creating an
.cmd
file with the path and exe in and makes a shortcut for the .cmd file) then
you can attach an icon and it shows as expected.

There was some reason why this happens, but I don't remember exactly what
that reason was. Anyway, it is a known problem for all 16 bit DOS
applications, on all languages and versions of Vista. I think you just need
to put up with it.
- But worst: The keyboard layout changes to EN US when the program starts
(remember I am on a danish mashine). If I start an cmd prompt the layout
is
still danish, when I start the program whithin the prompt it changes to EN
US
but changes back to danish when ending the program. This is not an issue
on
win xp or win98 - have really played a lot around with it!


Vista itself has far better multilingual abilities than earlier versions of
Windows. But for compatibility, the NTVDM ("NT Virtual DOS Machine") in
Vista behaves just like the DOS of old ... in other words, it has poor
multilingual abilities! But, you can configure the NTVDM to run a Danish
codepage just like you did on a "real" MS-DOS PC, back in 1992.

First, test that KB16 runs okay, by entering the command:

C:\Windows\System32\KB16 DK,850,C:\Windows\System32\KEYBOARD.SYS

.... to enable a Danish keyboard. KB16 should return to a command prompt,
with no messages (error, or otherwise). The Danish keyboard will remain
active until you close the DOS prompt.

On Windows NT (including 2000, XP and Vista) a DOS application takes its
startup environment from the files C:\Windows\System32\Config.NT and
C:\Windows\System32\Autoexec.NT. So to activate a code page for a DOS app,
add the Danish code page commands to C:\Windows\System32\CONFIG.NT and
C:\Windows\System32\AUTOEXEC.NT, the same as you would to C:\CONFIG.SYS and
C:\AUTOEXEC.BAT on a DOS machine.

In CONFIG.NT add to the end of the file:

COUNTRY=045,850,C:\Windows\System32\COUNTRY.SYS

In AUTOEXEC.NT add to the end of the file:

C:\Windows\System32\KB16 DK,850,C:\Windows\System32\KEYBOARD.SYS

Now to test, open a Command Prompt.
Then run the command "command.com". This will start an instance of the
MS-DOS Command processor.
Run the command "edit", to start the DOS editor.
Try typing in a few words in Edit, to see if the new Danish keyboard is in
effect.

If it doesn't work in Edit, then review the above steps carefully.

If it works in Edit, but doesn't work in your old DOS application, then your
app is not taking its code page info from DOS. It may be storing it in a
config file, or the like.

If it works in your application - hey, problem solved!

Hope it helps; let us know how you get on.

Vi ses! :)
 
G

Guest

G'day Andrew (Sorry, my australian is a bit rusty!)

Thanks very much for your solution. I edited autoexec and config.nt and
everything works like a charm. I simply had forgotten the kb16 option. Had
only tried keyb and found that it wasn't supported. Is keyb.com 32 bit and
kb16.com 16 bit or what?

You have nothing to ad to the icon issue? Maybee a Microsoft bug or what?

To Chen Shen
Tried your proposal; no luck. But thanks anyway!

To Synapse Syndrome
Have plyed around with both DosBox and Virtual PC 2007 - both neat programs,
but to my needs I think it's a bit overkill - thanks anyway!
 
A

Andrew McLaren

You have nothing to ad to the icon issue? Maybee a Microsoft bug or what?

This problem came up, back during the Vista beta. I thought I still had an
email from the Windows dev guy, but I can't find it now. Anyway as I recall,
it was sort of "by design". It was not a deliberate change, but because of
the way some shell APIs now worked in Vista, it was really difficult to
display the icon resources from 16-bit files. I can't remember the precise
details - sorry. I think it is unlikely Microsoft will ever fix this,
because it's not a functional problem (ie, the icon still *works*, it just
doesn't display the resource); and to fix it would have been a lot of
complicated work for a fairly edge scenario.

But if lots of people complain, I guess they will consider fixing/changing
it!

Cheers,
 
G

Guest

Thostrup said:
In Vista Business (Danish) I have following problems with some old 16 bit Dos
programs:

- They can't run in fullscreen mode (but this is a well known Vista
limitation so newer mind)
- Can't show the correct icon even if you in properties for the exe attach
an icon manually. But if you start the exe via an cmd file (creating an .cmd
file with the path and exe in and makes a shortcut for the .cmd file) then
you can attach an icon and it shows as expected.
- But worst: The keyboard layout changes to EN US when the program starts
(remember I am on a danish mashine). If I start an cmd prompt the layout is
still danish, when I start the program whithin the prompt it changes to EN US
but changes back to danish when ending the program. This is not an issue on
win xp or win98 - have really played a lot around with it!

Any ideas out there !!

Regards Thostrup, denmark
 
G

Guest

This was very annoying to me also. I came up with a work-around that when
completed had a beautiful icon and to the user responds exactly the same as
under other versions of windows.

1. Create a new directory for all your missing icon 16 bit files and
populate it. (I called mine "16 bit."
2. Create a new directory for the macros you will write (I call mine
"Macros")
3. Create batch (*.bat) files for all your 16 bit programs. The beauty
here is that all program switches, navagation, directory changes etc. can me
included. Follow this with the "exit" command to return to windows. Save
this file into the Macros directory.
4. Send a shortcut to the desktop of the *.bat file,
5. Add any icon and rename the file as desired.
6. When you access this file from the desktop it behaves exactly as the
program pif under Windows XP.

If you have any questions about any of these steps, please feel free to
contact me at (e-mail address removed)

It is amazing to me that even though we have come a long ways from DOS, we
can use DOS programming to correct a Vista shortcoming.

Maynard Bertolet
 
G

Guest

Hi Andrew,
I'm just experiencing the same problem, but your solution (that seems so
logic) doesn't seem to work. Strange thing is that, if I copy AUTOEXEC.NT and
CONFIG.NT from C:\Windows\System32 to the directory of installation of my
16-bit old DOS program, modify them as you suggested, and specify them as
starting files in the PIF properties, my program works fine as regards
keyboard layout ...

But what starts malfunctioning is DOS2USB tool, that seems no more trapping
LPT1 output generated from my old 16-bit DOS program.
Note that, in the way you suggested, DOS2USB worked fine ...

I'm quite puzzled from this Vista behaviour. Do you have any hints?
Many thanks,
Enrico
 
A

Andrew McLaren

Buongioro Enrico
I'm just experiencing the same problem, but your solution (that seems so
logic) doesn't seem to work. Strange thing is that, if I copy AUTOEXEC.NT
and
CONFIG.NT from C:\Windows\System32 to the directory of installation of my
16-bit old DOS program, modify them as you suggested, and specify them as
starting files in the PIF properties, my program works fine as regards

Yes, that is strange.

Configuring the DOS keyboard settings in CONFIG.NT and AUTOEXEC.NT certainly
works for many other users. It has worked for Danish, Dutch, Turkish, and a
few other languages as well ... I'm pretty sure Italian should work too! :)

Anyway if you have a workaround, that's good ...
But what starts malfunctioning is DOS2USB tool, that seems no more
trapping
LPT1 output generated from my old 16-bit DOS program.
Note that, in the way you suggested, DOS2USB worked fine ...

Well, I don't know anything about DOS2USB, I've never used it or heard of it
before. It looks like a third-party utility. In many (most?) cases, you can
print from a 16 bit DOS application to *any* Windows printer, by mapping an
LPT port. For example, I have USB-attached printer called "MP530" (it's a
Cannon MP530). To make this printer visible to my 16-bit DOS apps, I run the
command:

C:\>NET USE LPT1: \\MyPCName\MP530

After this command completes, any application that prints to LPT1:, will
have its output redirected by the Windows Spooler to the USB-attached
printer MP530. There's no need to use or pay for any add-on utlities.

As with many things in DOS, there are several different ways a programmer
can make their application print. The "correct way" in DOS to print to an
LPT port is to use an OUT instruction to the Port at 0x378 (for LPT1). But
there isn't really a well-defined API in DOS for printing; the programmer
can control each of the 8 data pins one-by-one, in their code. So any given
DOS program might try to print to LPT1 in a non-standard manner, which
Windows or other software cannot recognise.

To test whether Printer redirection is working for DOS applications, try
printing from a "standard" DOS application like EDIT.COM. If printing works
okay from EDIT.COM, but your application fails to print okay, then the
application is probably using some non-standard technique to print. This
worked fine on a real, physical PC running MS-DOS; but it may not work in
the virtualized world of the NTVDM.

Let us know how you get on.

A piu tarde :)
 

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