Installing 32-bit programs with 16-bit setup launcher stubs

Got a ReactOS tutorial to share? Drop it in here

Moderator: Moderator Team

Installing 32-bit programs with 16-bit setup launcher stubs

Postby SomeGuy » Tue Feb 28, 2012 6:37 am

From about 1995 to 1998 it was common practice for setup programs to launch using a Windows 3.1 16-bit loader stub. This gave installers the ability to package multiple binaries for Win16, Win32s, Win32, and Windows NT for Alpha CPUs. At the time it was a reasonable thing to do since all of these platforms could execute 16-Bit Windows 3.1 applications.

Today, neither ReactOS nor 64-bit Microsoft Windows implement the ability to run 16-bit Windows 3.1 applications. The result is that there are many, many 32-bit programs that would run fine on these OSes, but are prevented from installing.

This tutorial details workarounds for the two most common installers: InstallShield and Microsoft ACMSetup.

Identify your Setup

This can be the most troublesome step as setup packaging varies greatly.

First, if the setup program is inside a self extracting archive then you will need to extract it. Usually opening the EXE with an archive tool such as 7-Zip will enable you to extract the files. If that fails, you may need to run the self extractor in an environment that can run it and copy the files from the TEMP folder or location it extracted to.

* If the file _inst32i.ex_ is among the install files listed, then it is an InstallShield based setup.

* If the file ACMSETUP.EXE is among the install files listed, then it is a Microsoft ACMSETUP based setup.

If the files include neither of those, then it is likely a proprietary setup.

InstallShield general method

Extracting the setup engine under Windows/Wine:

InstallSheild uses a small "Setup Launcher", usually named SETUP.EXE, to extract the "InstallShield Engine". The Engine is what does the actual application installation, and is what you visually see during the installation. The Setup Launcher may be 16-bit while the InstallShield Engine is 32-bit.

Launch setup under Windows or Wine and leave it running. This extracts a file, usually called _INS0432._MP, in the temp folder. The exact name may differ, but it should end in _MP and the version description should contain "InstallShield Engine". Make a copy of this file and rename it to SETUP32.EXE. Then copy this file plus the application install files to a writable folder where ReactOS can run it. Under ReactOS, run the SETUP32.EXE to install your program.

Note that using this method, the location you are installing from MUST be writable. The setup engine creates a temp folder in the directory it is run from and will fail if you try to run it directly from a CD.

InstallShield 3 shortcut

Download the InstallShield 3 Engine without Windows/Wine:

View the version properties of the Setup Launcher, usually called SETUP.EXE. (under Windows, right click, select Properties, and click the "Version" tab).

If the setup version is 3.xx.xxx, then as a convenience, you may download the Setup Engine executable directly from here rather than manually extracting it: Is3Engine.zip

Place this file in a WRITABLE folder with the rest of your application install files and run it instead of setup.

InstallShield 5.x alternate method

Download and replace the InstallShield 5 Setup Launcher with a 32-bit version:

All Setup Launchers (setup.exe) created by InstallShield 3 and InstallSheild 5.0 are 16-bit executables. Starting with InstallSheild 5.5 a vendor could optionally use a 32-bit Setup Launcher. (They must have skipped version 4). As far as I can tell, all Setup Launchers created by InstallShield 6 and later are 32-bit.

The InstallShield 5.5 32-bit Setup Launcher can be used as as drop-in replacement for the 16-bit Setup Launcher included with applications generated with 5.0 and 5.5. It is not compatible with applications generated with 3.0.

View the version properties of the Setup Launcher, usually called SETUP.EXE. (under Windows, right click, select Properties, and click the "Version" tab).

If, and only if, the setup version is 5.xx, then you may directly replace the 5.x 16-bit Setup Launcher with a 5.5 32-bit Setup Launcher. For convenience you may download an InstallShield 5.x 32-bit Setup Launcher from here: Is5Launcher.zip

With this method, your application's setup folder need not be writable.

Microsoft ACMSetup

Run ACMSETUP manually

Many Microsoft setup programs from 95 to 97 have a 16-bit loader stub. Instead of running this file, locate and run the 32-bit ACMSETUP instead. In some cases this and other setup files must be extracted from a self extracting executable or CAB file. When running the ACMSETUP pass the "/T" parameter followed by the name of the included ".STF" file. (Or alternatively rename the .STF file to ACMSETUP.STF).

For reference, here are other parameters you can use with ACMSETUP. The exact functionality may vary from program to program:

/t tablefile, Specifies the STF filename: the default is <base>.stf, where <base> is the filename of the Setup executable (for example., Setup.stf is the default file for Setup.exe). This also requires the full path, in quotes if there are spaces
/s srcdir, Specifies location of source files, used by bootstrapper. Quotes are required if there are spaces in the path. If you are installing from the CD, this is generally not the case. For example if your CD-ROM is drive letter D, the switch would be: /s D:\
/k "CD Key", enters and validates the 10-digit key (enter the number without dashes. Quotes are required)
/n "name", Specifies the user name: Windows registry Copy Disincentive name if it exists; otherwise, Setup will use name supplied here (quotes are required and there is a space between the 'n' and the first quote).
/o "organization name", Specifies the organization name: Windows registry Copy Disincentive organization name if it exists; otherwise, Setup will use organization name supplied here (quotes are required and there is a space between the 'o' and the first quote).
/b# Abbreviated list of flag functions:
/b #, Suppress the dialog box for choosing installation type of preselecting one of the large buttons:
/b1 represents first button,
/b2 the second . . .
/q #, Quiet Mode: performs a batch mode installation with no user interaction. If present, option can be 0, 1, or t:
/q or q0 suppresses all dialog boxes except the exit dialog box;
/q1 suppresses all dialog boxes, including the exit,
/qt suppresses all the UI, including the blue background and copy gauge.
/a - Administrator mode
/f - Floppy mode
/g - Create logfile
/m - Maintenance mode
/r - Reinstall
/u - Uninstall; UA Uninstall remove all
/x - Network logfile
/y - Install without copying

Example, from the root of drive D:, type
d:\setup\acmsetup /t d:\setup\vs98ent.stf /s d:\

CD-Autorun programs

Older CDs commonly have 16-bit Autorun programs, while the setup program may be 32-bit (or convertible as above)

Usually bypassing CD-Autorun programs is a simple matter of locating the setup folder on the CD-ROM, and running setup directly.

However, there are a number of silly setup programs that will refuse to run if they are not started through the CD-Autorun program. Usually the CD-Autorun program simply passes an additional command line parameter to the setup program to indicate it was started the way they wanted you to start it.

To find the secret command line parameter, run the setup program in an environment that will run it, and use Process Explorer to determine what command line it was started with.

Other Proprietary 16-bit setup programs

There is not much that can be done for other unknown 16-bit setup programs.

With some simple programs you may install somewhere else, copy the program files, and then run them.

With more complicated programs you may need to log modifications to the registry, INI files, system folders and replicate those changes on ReactOS.

Be sure to check the ReactOS Compatibility Database to see if your application is listed, and if known workarounds are available.

In theory it might be possible, down the road, for ReactOS to identify known 16-bit loaders and perform these workarounds itself. If it did, this would take care of perhaps 60% of the applications with "16-bit" Setups. And it would be quite a bit easier than implementing an entire Windows 3.1 subsystem.

If anyone has a setup program they need help with, please create a topic in General Discussion about it.

Example of ACMSETUP:
Download the Microsoft Word Viewer "Wdview97.exe".
Open this self extracting file with an archive utility.
Extract the contents to a setup folder such as c:\wv97setup
You may note that the setup.exe is 16-bit.
Extract the contents of Viewer1.cab to your setup folder - this contains the 32-bit ACMSETUP.
In that folder, copy wviewer.stf to acmsetup.stf.
Run ACMSetup and install the program.

Example of IS3:
Download the Sim City 2000 demo from here: http://www.classicdosgames.com/game/Sim ... ws_95.html
Unzip the file in to a setup folder such as c:\sc2ksetup
In that folder, notice _inst32i.ex_ exists. - This is an InstallShield setup.
Notice that the version of setup.exe is 3.00.077.0 - This is an InstallShield 3 setup.
You may also notice that setup.exe is a 16-bit program and will not run under ReactOS.
Download the InstallSheild 3 Setup Engine from here: Is3Engine.zip
Extract SETUP32.EXE from this archive to your setup folder.
Run SETUP32.EXE - Install, and enjoy!

Example of IS 5:
Download the Worms 2 (with online play) demo from here:
http://www.classicdosgames.com/game/Worms_2.html
Unzip the file in to a setup folder such as c:\worms2demo
In that folder, notice _inst32i.ex_ exists. - This is an InstallShield setup.
Notice that the version of setup.exe is 5.00.212.0 - This is an InstallShield 5 setup.
You may also notice that setup.exe is a 16-bit program and will not run under ReactOS.
Download the InstallSheild 5 32-bit Setup Launcher from here:
Is5Launcher.zip
Extract the SETUP.EXE from this archive over the one in your setup folder.
Run SETUP.EXE - Install, and enjoy!
SomeGuy
 
Posts: 579
Joined: Mon Nov 29, 2004 9:48 am
Location: Marietta, GA

Re: Installing 32-bit programs with 16-bit setup launcher st

Postby BrentNewland » Thu Mar 01, 2012 10:04 am

I was doing a bit of research myself on this and I came across this page: http://msdn.microsoft.com/en-us/library ... 43(v=vs.85).aspx

The 64-bit Windows Installer can seamlessly install 32-bit MSI-based applications on 64-bit Windows. For older applications that use a 16-bit stub to launch a 32-bit installation engine, 64-bit Windows recognizes specific 16-bit installer programs and substitutes a ported 32-bit version.

16-bit DOS, Windows, or OS/2 applications often use a 16-bit stub to check the machine type, then launch a 32-bit installation engine to actually perform the installation. To enable installation of applications that use this technique, 64-bit Windows substitutes 32-bit versions for the following 16-bit installer programs:

Microsoft Setup for Windows 1.2
Microsoft Setup for Windows 2.6
Microsoft Setup for Windows 3.0
Microsoft Setup for Windows 3.01
InstallShield 5.x
The list of substitutions is stored in the registry under the following key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\NtVdm64.


The installer redirection sounds like an important feature for ReactOS, especially if they can do Installshield 3 (which Windows can't). I'm sure there are common ways to determine if a program is 16-bit, if a 16-bit program is launched ReactOS should be able to do some checks and see if it's an installer that can be run like this.


It would be nice if ReactOS could detect DOSBox (like Wine can) for running 16-bit console apps. Since ArwinSS integrates more Wine code, and Wine can run programs back to Windows 1.x, I wonder if it would be able to handle 16-bit GUi apps out of the box.



*edit* Found a page with information about opening Installshield 3 executables https://github.com/ahnurmi/openiw/wiki/InstallShield-v3

*edit2* Found an interesting page, this guy made an AutoHotKey to launch any 16-bit programs in DOSBox by changing the default EXE handling: http://vogons.zetafleet.com/viewtopic.php?t=26384
Something like that could be modified to search for Installshield or Microsoft setup headers and launch the replacement setup program


*edit3* I filed a bug for this at http://www.reactos.org/bugzilla/show_bug.cgi?id=6932
I saw a lot of similar bugs but they only talked about 16-bit software. This one is specifically for launching 32-bit installers for 16-bit setup stubs.
BrentNewland
 
Posts: 174
Joined: Wed Oct 05, 2011 7:32 am


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests