Can't run 16-bit Windows Program

S

Srav

When i try to run the setup.exe(One of our vendor software) from the temp
folder on XP SP3 machine, it throw up the message "Can't run 16-bit program".
Where as it goes well when i run from XP SP2 machine or if i run from shared
drive/c drive of XP SP3 machine. I am just wondering what causes the issue
and what is the solution to make it run from the temp folder of windows XP
SP3 machine.
 
V

VanguardLH

Srav said:
When i try to run the setup.exe(One of our vendor software) from the temp
folder on XP SP3 machine, it throw up the message "Can't run 16-bit program".
Where as it goes well when i run from XP SP2 machine or if i run from shared
drive/c drive of XP SP3 machine. I am just wondering what causes the issue
and what is the solution to make it run from the temp folder of windows XP
SP3 machine.

32- or 64-bit versions of Windows XP? If 64-bit, read:

http://support.microsoft.com/kb/896456

If 32-bit, and when trying to install Windows 9x era programs on an
NT-based version of Windows, read:

http://support.microsoft.com/kb/324767

Also, for those old programs:
- Make sure that the path to wherever you stored the install file
doesn't contain any space characters.
- The path to the store folder for the install program should not
contain long names, nor should the install file have a long filename.
LFN (long filename support) may not be included in the old version of
InstallShield that was used to build the installer program; see
http://www.amigaforever.com/kb/14-131. Simply use a path to store the
installer program where every folder and file name follows the old 8.3
naming convention (so there is no LFN renaming to generate short names).
- Check that its store folder also has full permissions by the Everyone
account.

Check if some other 16-bit program already caused loading of NTVDM (I
think that's it name). It is the emulation layer to translate 16-bit
system calls to 32-bit equivalents. There were some hotfixes to allow
more than 16 16-bit processes to run under NTVDM but I thought they were
included in SP-3. Just kill off any other 16-bit processes for now
before starting the install.

You can run into other problems once you install those programs. Some
assume that a hard disk partition will not exceed 2GB in size (an old
partitioning limit). So they compute free disk space based on modulo
arithmetic. You might have 2n.1 GB of free space (where 2n is some nth
multiple of 2GB) but the program will think there is only 0.1 GB left
and claim there is insufficient free disk space for it to run. You have
to dump enough files in a temp folder to consume disk space to get it
under the 2N boundary so the difference between free disk space and the
2GB x N modulo computation make the program think there is enough free
space. You can also run into problems if you have more memory than the
program is used to seeing. If the DOS-mode program relies on any
kernel-mode drivers, it won't run at all since NT-based versions of
Windows protect against that kind of corruptive intrusion. 16-bit
drivers (user mode) won't be supported.

Since it is an old program that was probably designed to run under
Windows 3.x/9x/ME then why not get VMWare Server or VirtualPC and run a
guest (virtual machine) that loads Windows 9x and install the program in
the guest OS?
 
S

Srav

Thanks a lot for th reply. Sorry as i forgot to mention that it is 32- bit
versions of Windows XP.

i went thru d mentioned link, if the files has to be repaired then it
should give a problem when i ran from other folders too.

It seems space in the path of setup file(my temp folder path is
"C:\Documents and Settings\myuserid\Local Settings\Temp")is causing the
problem. If so why it causing for only XP SP3 not for XP SP2?? Is there any
changes came up in SP3 in regards to this??

Thanks in advance,
Srav
 
V

VanguardLH

Srav said:
Thanks a lot for th reply. Sorry as i forgot to mention that it is 32- bit
versions of Windows XP.

It seems space in the path of setup file(my temp folder path is
"C:\Documents and Settings\myuserid\Local Settings\Temp")is causing the
problem.

Not just with spaces but that also has folder names exceeding the 8.3
filenaming scheme. Yet tried creating a C:\Temp folder and running the
installer from there?
If so why it causing for only XP SP3 not for XP SP2?? Is there any
changes came up in SP3 in regards to this??

Because, as mentioned, the installer might be using modulo arithmetic
(actually it usually is a rollover problem with an undersized variable)
and you have differing amounts of free disk space (from the next higher
up 2GB boundary).
 
S

Srav

Thanks you very much for u r reply. Sorry for delay.
When i run from the C:\temp and some other folder which has the spaces, Yes
, it working fine. So space is not an issue here. It might be bcz of long
name as error shows that 'it could not find a file in
C:\DOCUME~1\...\setup.exe ".

Can you explain indetail about modulo arithmetic, mean while i would google
it to get more idea on it.

Thanks,
Srav
 
S

Srav

VanguardLH,

Sorry,I forgot to mentioned that i tried to change registry variable
NtfsDisable8dot3NameCreation to 0. But there was no luck.

Srav
 
V

VanguardLH

Srav said:
Thanks you very much for u r reply. Sorry for delay.
When i run from the C:\temp and some other folder which has the spaces, Yes
, it working fine. So space is not an issue here. It might be bcz of long
name as error shows that 'it could not find a file in
C:\DOCUME~1\...\setup.exe ".

Can you explain indetail about modulo arithmetic, mean while i would google
it to get more idea on it.

Awhile back, 2GB was the maximum size for a partition. Old games
written in that era figured that the partition could never be larger
than 2GB. So they computed free disk space by subtracting the currently
used disk space from 2GB; however, the computation used the difference
from whatever was the next 2GB boundary minus the used disk space. It
wasn't intentional but their computation didn't account for partitions
that were larger than 2GB so there was overflow in the computations
which effect modulo arithmetic (the overflow bits got tossed since there
wasn't anything to hold them and just the remainder was used).

Say you had a 16GB partition and only 5.8GB was used. You have 10.2GB
left. Yet if the computation is working on 2GB boundaries then it sees
the difference between 6GB and 5.8GB to only find 0.2GB is free.

http://en.wikipedia.org/wiki/Modulo
http://en.wikipedia.org/wiki/Modulo_operation

I don't know what algorithm the games might've actually used. That they
were doing 2GB modulo arithmetic to compute the ceiling to the next 2GB
boundary was an observable behavior, not something derived from knowing
their code (game authors are obviously very jealous of their code and
aren't going around publishing it).

To make an easy example of rollover of an undersized variable, say you
define a 4-bit integer (in this example, an unsigned value so the first
bit is part of the value instead of indicating a positive or negative
value). That means the variable can ran from 0 to 15 (0000 to 1111).
When you add 1 to 15 using this variable, what do you get? Can't be 16
because the integer isn't large enough to hold 5 bits. 15 in hex for 4
digits is 1111. Add 1 to it and it overflows to become 0000. This
overflow or rollover is similar to modulo 16 where the remainder from
15+1 is 0.

By not having enough bits in the integer (or those bits from it that are
used in addressing), values larger than what it can hold result in
giving you the remainder from a similar modulo computation. If the game
or its install program is computing on an effective 2GB modulo then you
could have 11.8GB used space which would give a module 2GB remainder of
just 0.2GB although there was another 20.2 GB left in that 32GB
partition. The overflow for their too-small variable effects modulo
arithmetic with the result that it sees too little free space is left
before the next 2GB boundary.

To get around their modulo effect was to add enough files onto your hard
drive to consume more disk space to move the used disk space past the
next 2GB boundary. So if you had 11.8GB used, you would add 0.3GB in
temp files so you had 12.1GB used space. Now the game would compute
14GB - 12.1GB and think there was 1.9GB of free space (despite there
really is 19.9GB available in the whole 32GB partition). You move the
"used space" pointer past the next higher 2GB boundary so the difference
between it and the then next higher 2GB is even greater than it was
before.

http://en.wikipedia.org/wiki/Fat16
"Final FAT16"

FAT-32 came out later than when a game was released or during its
development (and authors were still coding based on FAT-16). Maximum
partition size of 2GB under FAT-16. The games were coded for what was
common at the time and used computations that worked under those
conditions. FAT-32, NTFS, and far more huge partitions is not what they
planned on during development.

Looks like the real problem in your case was due to either spaces or the
length of the path to the installation program.
 

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