MSI Builder Step-by-Step: Product Details

This first article in our step-by-step guide for the SAPIEN MSI Builder walks you through the initial settings you need for every Windows Installer you will create.

There are reasonable defaults in place for a number of fields, and some you should not change unless there is a very specific reason.

image

Alright, let’s get to it and take a closer look at these fields:

image

Product Details

Product Name

Windows will show the Product Name as an Add/Remove Programs entry. The Product Name will also be used later to substitute [Product] in the path specifier. This field cannot be empty.

Product Version

This can be a number (e.g., 2.4.6.7) or the name of a file—typically your product’s main executable file—which contains a version resource. There are several things to consider here. In order for updates to your product to work properly, your version must increase for each release. Assuming you already do this for the main executable, providing the path to that file here is your best option. You should never decrease that version number. Any increases need not be sequential; you can go from 2.6.309 to 2.7.312 without any problem. While version resources for executables allow and support a 4-element number (major.minor.maintenance.build) Windows installer does not evaluate the ‘build’ portion. So 2.5.6.1 and 2.5.6.17 would be considered identical and the same product version. If you maintain a version number here, please keep in mind that while a major version increase usually resets the minor part (e.g., 3.8 –> 4.0), the maintenance and build portion generally do not reset—so 3.8.167 would update to 4.0.168.

Company Name

This string will also show up in Add/Remove Programs, as shown below. This entry is also used to resolve the [Company] part of the default path name. This field cannot be empty if [Company] is used in the path specifier.
image

Product Type

The selection of Script Application, Windows Application, or PowerShell Module affects the default icon and template selection when building the MSI file. While a Windows Application will always be installed in a subfolder of Program Files, selecting Script Application or PowerShell Module will select default folders in the user data folders on the target machine if “Install for all users” is not selected.

Product Icon

This is the icon that will be shown in Add/Remove Programs. A default icon is set based on your installer type, but you can select any standard Windows .ICO file you have.

Install Folder

This entry determines the default install folder for your product. The [ProgramFiles]\[Company]\[Product] setting is an industry standard. If this is not a corporate product or for in-house use, you can abbreviate this to [ProgramFiles]\[Product]. You can enter a specific path here, such as “C:\CorporateTools\Printers”. This field cannot be empty.

MSI Options

Install for all users

When checked, Windows Installer will make start menu entries and shortcuts available for all users of a computer. If not checked, start menu entries and potential shortcuts are only visible to the user installing the product.

Hash file type

You can select from MD5, SHA1, and SHA256 hash file types. These files are generated when the MSI is completed and can serve as a means to verify the integrity of the installer.

Require Administrator

If checked, the MSI file will require an admin login and elevation before installing the product. If you install for all users or to a protected folder (e.g., Program Files), your installer will likely fail without this option.

Package selection

You must select the correct platform for your installer. Windows 32-bit, Windows 64-bit, and Windows ARM 64 are currently supported.

Product IDs

Product IDs are generated for you in virtually all instances:

  • The Upgrade Code identifies your application and should never change unless you want side-by-side installation.
  • The Product Code changes with each version of your product.

The generation of these codes is an automatic part of the build process. Under normal circumstances, you should never have to change these numbers yourself. They are displayed in case you need them to locate relevant registry entries Windows Installer makes on your behalf and in case you MUST reset the Product Code to a previous value. If you change the Upgrade Code, Windows Installer will no longer recognize and update previous installations; in this case it is highly recommended that you also change the product name and install location.

Stay tuned to our blog for more articles in the MSI Builder Step-by-Step series.

Related

Feedback

If you have any questions or suggestions, please feel free to post in the comments below or use the SAPIEN Support Forum.