As you know (see link: https://blogs.flexera.com/installtalk/2010/11/choosing-your-project-type-basic-msi-installscript-or-installscript-msi.html), InstallShield enables you to create your installers using one of three primary installation project types: Basic MSI projects, InstallScript projects, and InstallScript MSI projects. Based on changing requirements, it’s occasionally necessary to convert a project to a different type; sometimes this happens before earlier versions of your product are released, and sometimes after. Today we’ll look at the first issue, converting between project types.
InstallShield supports some automatic conversion types, available by pulling down the Project menu and selecting Project Converters. Which commands are enabled in that submenu depend on the type of project currently open in the InstallShield environment; the following figure shows an open Basic MSI project (as described in the caption bar), with the Convert to InstallScript MSI Project command enabled.
The two primary built-in types of conversion are:
Basic MSI project to InstallScript MSI. The project’s features, components, and component data (registry data, environment variables, and so on) are preserved. As noted in the confirmation dialog box when you select the conversion command, your project’s MSI dialog boxes, control events, and control conditions will be removed and replaced with a default set of InstallScript dialog boxes that you control in your InstallScript event handlers.
Naturally, there are many differences in settings supported by the respective project types, which is presumably what prompted the conversion in the first place: The motivation for this type of conversion usually comes back to having advanced user interface requirements. It can be instructive to compare the before-conversion and after-conversion projects using the InstallShield MSI Diff utility.
InstallScript MSI to InstallScript. The project’s feature–component–data hierarchy is preserved as much as possible. However, there are many differences in built-in capabilities between the project types, and therefore some items cannot be converted. During conversion, the InstallShield output window displays information about functionality that must be duplicated in your script, using messages such as:
Warning: The ‘RegLocator’ table is not supported. Use InstallScript to duplicate that functionality.
Warning: The ‘RemoveFile’ table is not supported. Use InstallScript to duplicate that functionality.
Converting to a Basic MSI Project
There is no direct conversion from an InstallScript project to a Basic MSI project, but you can use the Repackager tool to create a Basic MSI project from an InstallScript installer. Repackager provides different mechanisms for monitoring installer changes and creating a Basic MSI project that duplicates these changes. Repackager is included with the Premier edition of InstallShield (link) and with the AdminStudio Suite (link)
Similarly, if you have an MSI database and want to convert it to a Basic MSI InstallShield project, you should not repackage it since repackaging will generate new product and component codes, which can break upgrades along with as any product functionality that depends on specific component codes. Instead, you can use the File > Open command, specifying the Open as: Wizard setting before opening the desired MSI database.
This launches the Open MSI/MSM Wizard, which prompts you for a project name and location, after which you’ll have a project file you can modify and build. Without selecting Open as: Wizard, InstallShield opens the MSI database in Direct Edit mode, where you modify the installer’s database tables directly. An InstallShield project is a recipe for cooking up installers; Direct Edit mode is doctoring up food you’ve already cooked.
In a future post, we’ll talk about making your new project able to remove existing products that have been deployed using an installer created using a different project type. For now, if it ever comes up, you know you can change your mind about your project type without having to completely start over.