Installshield 64-bit project setup
-
07-07-2019 - |
Question
What is the best way to use InstallShield to generate installers for both 32 and 64-bit environments? The majority of my application is bit-neutral (.net, Java, data files). I would prefer it if I only had to package up those files once. Is there a standard approach to reducing the maintenance of the installshield projects? Currently the only solution I can find is to have two duplicate projects, where each of the components are flagged with 64-bit and the default install directory set to ProgramFiles64. There must be a better way to do this!
Only a very small portion of my application cares how may bits it is being executed on. We have a few C++ DLLs and JNI calls that need to be different. Most of this is determined at runtime by checking if the JRE we are running on is 64-bits.
I would like to avoid distributing two 130 MB files, and ideally ship one big zip file that has both installers in it, each referencing common components. Do I need to create merge modules for the common things and reference them in each of the projects?
We are using InstallShield 2009 (Premier) if that matters.
Solution
If you can get away with having zero 64-bit components in your setup, then you can just make it a 100% 32-bit setup, and it will work equally well in 32-bit and 64-bit Windows.
If that's not possible, I recommend using Product Configuration Flags. On the "Releases" view, create multiple Product Configurations, such as "XP32" and "XP64". Mark the Template Summary field as appropriate: one as "Intel;1033" and the other as "AMD64;1033". Associate each with a unique Product Configuration Flag to identify it, e.g. "xp32", "xp64". Then, for each Feature, set the appropriate Release Flag. You can set the 64-bit property on your 64-bit components as necessary; just make sure that the Features you mark as "xp32" have no 64-bit components in them. This will allow you to only have 1 InstallShield project file, but generate both 32-bit and 64-bit releases.
OTHER TIPS
If you use a single 32-bit setup project as mentioned in this thread, you may run into problems running 32-bit processes on 64-bit systems depending on what you are doing. Since your setup is a 32-bit process, the OS assumes it needs to use 32-bit resources. On 64-bit machines, you have both. For example, system32 and SysWOW64. (Strangely enough, the system32 houses the 64-bit resources while the SysWOW64 is 32-bit.) You can force the OS to use the 64-bit resources by using the SYSNATIVE file system redirector. I found this useful when setting up IIS using DISM.exe or PKGMGR.exe on Windows Server 2008R2 and 2012.