Search code examples
installshieldinstallshield-2012

Can I select more than one component in the "Installation Designer"?


I am creating an installer for a 64 bit application that includes thousands of 3rd party DLLs (~2000)

According to InstallShield best practice, each DLL must be in a different component.

(from the doc) "Each component should contain only one portable executable file (an .exe, .dll, or .ocx file) or WinHelp file (.hlp file)."

So I have thousands of Components that I need to change the "64-bit component" property from "No" to "Yes".

The component wizard does not let me do this when I create the components.

Question: Is there a way to do a multi-selection of all the components to be able to change the property for all components at once ? or do I have to manually select each component and change the property ?

Note: I know that if 1 component is marked as 64-bit, then the installation will be "64-bit" aware.

Thanks.


Solution

  • There is no support for multi-selecting the components and editing them. However there are at least three workarounds with varying levels of ease.

    • Modify the Attributes column of the Component table in the Direct Editor. In the common case you will be replacing a series of components with the value 8 (msidbComponentAttributesSharedDllRefCount) with one that also includes 256 (msidbComponentAttributes64bit). If that is the case, you can just modify them in bulk to 264.
    • Use the automation interface property ISWiComponent.Attrib64BitComponent to modify your components by using a script.
    • In InstallShield 2016 or later, before creating the components, set MsiComponentAttributes in the InstallShield table to a value such as 264.

    Note that before taking the time to modify all the components to be 64-bit, you should make sure that you need to do so. If these components only install a DLL to a 32-bit file location, and do not install registry keys to any 64-bit registry locations (that includes COM extraction; if you're using COM extraction on these files, they likely do have 64-bit registry keys and thus need to be 64-bit), there would be no need to mark them 64-bit.

    Once you've confirmed you need to change them, note that if you've previously released the package with a 32-bit variant of the component, you also need to create a new GUID for the component, as part of following component rules.

    Note as well that (as you mention) once you mark any component as 64-bit, you are required to mark your entire package as 64-bit, and it will no longer install on a 32-bit machine.