Templates
What is Master Packager Templates feature?
Master Packager Templates feature is designed to allow automate repetitive tasks application packagers perform on MSI/MST.
Templates can work as one-place storage for your favorite Custom Actions that can be applied with one click.
PowerShell support allows to create and store custom PowerShell scripts that will be executed when the Template is being applied adding returned PowerShell Script value to the MSI table.
How to use Templates?
Templates view shows all Templates that are present in MSI file.
By double clicking on a Name or clicking on ✏ icon open Template editing flyout view.
Supported MSI tables
- Property table
- Registry table
- Component table
- Custom Action table
- Install Execute Sequence table
- Binary table
- Summary Information
How to create a custom template?
For Properties
- Open MSI and go to the Property table
- Select one or more Property table rows that need to be added to the template
- Right-click on one of the selected rows and press “Add to Template” button
- Create a new template name and press the arrow button in the left textbox
- Or choose an existing template in the right side dropdown
- Double-click on Operation and Apply On columns to choose the settings needed when applying the template
- Press the Add button to create/modify the template
For Registries
- Open MSI and go to the Registry table
- Select one or more Registry table rows that need to be added to the template
- Right-click on one of the selected rows and press “Add to Template” button
- Create a new template name and press the arrow button in the left textbox
- Or choose an existing template in the right side dropdown
- Press the Add button to create/modify the template
For Custom Actions
- Open MSI and go to the Custom Action table
- Select one or more Custom Action table rows that need to be added to the template
- Right-click on one of the selected rows and press “Add to Template” button
- Create a new template name and press the arrow button in the left textbox
- Or choose an existing template in the right side dropdown
- Press the Add button to create/modify the template
💡 If selected Custom Actions are using rows in binary table, no
extra steps are needed as Template feature will see it and save
binaries as well.
For Summary Information
Select in which situation to apply Summary Information changes using Apply On dropdown and edit rest of the values.
How to add automation for Templates?
Delete Summary Information entry
To delete the value from Summary Information use: <delete>
Applying this Template to the MSI or MST it will delete the value and will leave it blank.
Example:
Take value from Property table
[PROPERTY_property_table_name]
Example:
[PROPERTY_COMPANYNAME]
will be resolve value of COMPANYNAME property in the Property table when Template is applied.Do NOT resolve Property value
Do NOT resolve Property value
There could be a situation when property value needs to be resolved only on MSI installation, not on the moment the template is applied. To do that use square brackets and template will not resolve Property value.
Example:
[COMPANYNAME]
will be resolved as [COMPANYNAME]
Resolve custom PowerShell returned value
To use custom PowerShell script return value use PowerShell script name in square brackets.
Example:
For PowerShell script with name PS_COMPANYNAME
use [PS_COMPANYNAME]
in the template.
Predefined Templates
Convert CMD command to VBS