Académique Documents
Professionnel Documents
Culture Documents
Volume I, Issue 9
An Introduction to 64-bit
The 64-bit Advantage
Installers: Part 2
The computer industry is
changing, and 64-bit technology
is the next, inevitable step. The
In issue 8 of the 64-bit Insider newsletter, we discussed
64-bit Insider newsletter will help
you adopt this technology by the different settings that should be considered when
providing tips and tricks for a working with installers that deploy 32-bit and 64-bit
successful port. binaries. We learned that only an installer marked as x64
or Itanium can deploy both 32-bit and 64-bit
Development and migration of 64- components. We also learned about the changes that
bit technology is not as
complicated as the 16-bit to 32-bit must be made when the installer needs to explicitly write
transition. However, as with any to the 32-bit section of the registry.
new technology, several areas do
require close examination and In this issue of the 64-bit Insider newsletter, we’ll look at
consideration. The goal of the 64- yet another approach you can follow when working with
bit Insider newsletter is to identify
installers that deploy 32-bit and 64-bit components:
potential migration issues and
provide viable, effective solutions nested installers.
to these issues. With a plethora of
Web sites already focused on 64- Before reading any further, you should understand the
bit technology, the intention of basic concepts behind installers. If you are unfamiliar
this newsletter is not to repeat with this topic or need to refresh your memory, please
previously published information.
Instead, it will focus on 64-bit
read the Visual Studio Installer Quick Start guide at
issues that are somewhat isolated MSDN:
yet extremely important to http://msdn.microsoft.com/library/default.asp?url=/library/enus/vsin
understand. It will also connect stal/html/vehowvisualstudioinstallerquickstart.asp
you to reports and findings from
64-bit experts.
Nested
Installer
Figure 1 Nested installer made of separate 32-bit and 64-bit installers
When the installer shown in Figure 1 runs, first, the 32-bit installer will execute, modify
any registry/filesystem settings, and then the 64-bit installer will run and modify its
corresponding sections of the registry and filesystem. The result is a single installer that
installs both 32-bit and 64-bit components without the need to explicitly specify registry
branches. This nesting of installers can be a real time saver if, for example, you have a
32-bit installer that modifies thousands of 32-bit registry keys that need to be used by a
32-bit component. You can either manually change all these keys in the installer setup, or
join your existing 32-bit installer with a 64-bit one and avoid making manual changes.
The Scenario
For the sake of this example, we’ll make the following assumptions:
• You already have an installer for a 32-bit application. (We’ll refer to this as
Registry Reader Installer.)
• You have a 64-bit application that communicates with the 32-bit component, and
has been deployed with its own installer. (We’ll refer to this as Complex
Operation Installer.)
• You want to deploy a single installer that will install both components on your
client computer.
• You do not want to modify the 32-bit installer you already have built.
To accommodate these needs, you should build a nested installer from the existing
installers—a process that consists of two steps:
2. Modifying the Installer Information with One Really Cool Application (ORCA).
To merge the contents of the 32-bit installer into the 64-bit installer, use the following
command:
msidb -d “Complex Operation Installer.msi” -r “Registry Reader Installer.msi”
At this point, even if the installer launches, it still will not work. Now, you must modify
some entries in order to finalize the nested installer.
When we merged the two installers in step 1, the contents of the Registry Reader
Installer were placed inside the Complex Operation Installer. Follow these next steps
to edit the database tables of the Complex Operation Installer.
1. Right-click the Complex Operation Installer, and select Edit with Orca from
the drop-down menu that appears. (See Figure 2.) Orca opens the installer file,
and you will be able to see all the tables and respective entries for the Complex
Operation Installer.
2. From the Tables column, select CustomAction to set a custom action that will
alert the installer to run the 32-bit portion of the installer once it finishes running
3. From the Tables menu, select Add Row. An Add Row dialog box appears. (See
Figure 4.)
c. Enter the exact name of the installer (in this case Registry Reader
Installer.msi.) that is being nested into the Complex Operation
Installer.msi in the Source field.
After you have completed the steps required to invoke the 32-bit installer, you must
indicate where the installer should look when uninstalling the 32-bit component. To do
so, follow these steps:
1. From the Tables menu, select Add Row. The Add Row dialog box appears.
c. Enter the exact name of the installer (in this case Registry Reader
Installer.msi.) that is being nested into the Complex Operation
Installer.msi in the Source field.
Figure 6 ‘InstallExecuteSequence’ selection from the Complex Operation Installer.msi dialog box
2. From the Tables menu, select Add Row. The Add Row dialog box appears. (See
Figure 7.)
Note: Use 6500 because there is no other sequence using this number, and it is just
before the InstallFinalize action whose value is 6600 in this example. The
InstallFinalize action marks the end of a transaction that begins with the InstallInitialize
action.
To finalize your modifications to the installer table, select Save from the File menu and
then close the ORCA application.
Summary
In issues 8 and 9 and of the 64-bit Insider newsletter, we have explored two different
methods for deploying 32-bit and 64-bit components from the same installer. The first
method involved modifying the installer project in order to write the necessary
information for both the 32-bit and 64-bit components. The second method involved
merging two installers from different bit architectures, to avoid making modifications to
the installer project.
Both approaches have pros and cons. If you have an existing 32-bit installer that does a
lot of registry modifications, you may want to create a nested installer to avoid changing
multiple entries in your installer project. On the other hand, if your 32-bit installer has
few modifications, you may want to follow the mixed-mode installer approach because it
will be more flexible and won’t require a lot of work to allow the 32-bit and 64-bit
simultaneous component installation.
Suggested Reading
Visual Studio Installer Quick Start
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/vsinstal/html/vehowvisualstudioinstallerquickstart.asp
Msidb.exe
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/msi/setup/msidb_exe.asp