Contents
- Package definition
- Package structure
- Package internal information
- Merge Module
- Files
- Registries
- INI Files
- Shortcuts
- Fonts
- Services
- ODBC (Open DataBase Connectivity)
- System variables
- Properties
- Running custom code from the package
- Custom Actions
- System Search
- Upgrades
- Patching
- Upgrading
- De-hardcoding and Variabilization
- De-hardcoding
- Variabilization
- Vendor MSI
- Definition
- Seller Vendor Customization
- Direct vendor MSI
- Vendor MSI hidden in setup
- Vendor MSI with patch
- Modify an MSI vendor, from cab outside to cab inside, etc.
- Msiexec.exe commands
- Installing a package
- Repairing a package
- Uninstalling a package
- Administrative Installation
- Creating logs
- Applying a patch over a MSI
- Installation with MST
- Active-Setup Mechanism
![Book cover](png/msi_book_cover.png)
De-hardcoding and Variabilization
Often in our package, we have to reference directories, as well as existing or non-existing files in the package. Some references differ depending on the user logged on to the machine (for example the %appdata% folder). To sort this out, make the package more independent from fixed values, by using dynamic values. The solution is made with the help of dehardcoding and variability.
De-hardcoding
Hardcoding refers to references to various paths whether they belong to our application or not. It is solved by referring to the existing properties in our package.
References to a Directory:
- [DirectoryNameInternal]
- [$ComponentName]
File references:
- long path [#FileName]
- shortcut [! InternalNameFile]
References to system variables: [%SystemVariableName]Property References: [InternalNameProperty]
Variabilization
Variabilization refers to values that can be changed by the person installing the package, even at the time of installation. In such cases, public properties are defined with the initial values at the time of creating the package. They can be subsequently modified by the administrator, doing an installation from the command line.
As an example, let’s assume the property LICENSEKEY exists in the MSI. During installation, the administrator can install the package with the following command:
Msiexec /i [path to msi.msi] LICENSEKEY=11111-11111-11111 /qb