InstEd provides an easy way to call other programs or scripts from within the InstEd application.
Under the Tools menu option, the External Tools... option allows configuration of the commands to launch the external tools. Each external tool added will subsequently be listed in the Tools menu as a separate menu option.
The components of an External Tool command are:
- Name: The display name that should appear in the meu option. You can use "&" in the name to designate the menu shortcut key. For example, "&Install current file" will be selectable from ALT+O (Tools) followed by ALT+I.
- Cmd Prefix: This is the first part of the command line that will be used to launch the tool. In simple cases this will be the entire command line. In complex cases this will be prefixed to the active file's path or the suffix e.g. msiexec /i
- Include current file in command: If this is selected, then the path to the active file (open and showing in InstEd) will be added to the command line after the prefix.
- Surround file with quotes: If the active file's path is to be included in the command line, then it will be surrounded with quotes if this option is selected.
- Cmd Suffix: This will be appended to the other elements of the command line. e.g. /l* "c:\temp\msi log.txt"
The example options above will result in a command line of:
msiexec /i "<path to current file>" /l* "c:\temp\msi log.txt"
Version 18.104.22.168 and later
Environment variables will be expanded.
Pass transforms as msi
If this option is checked, and the active file is a transform, InstEd will include in the command line a path that points to a temporary file location. This file will be an msi consisting of the base msi with all changes in the transform chain applied, equivalent to performing "Save Transformed".
This path will be in place of the active file's path in the command line.
This means that the external tool will operate on a msi that represents the active file, regardless of whether the active file is a transform or an msi.
When the external tool closes, the temporary msi will be compared against the base msi, and any changes that the external tool made will be incorporated into the transform file that was active before the external tool was launched.
Using the example command above, this allows msiexec to install the msi that represents the transformed msi.
Where this option becomes very useful is for tools or scripts that work only on msi's. For example, a packaging team may have a script that performs custom cleanup, however the script only works on msi files, and not transforms.
The "Pass transforms as msi" option allows InstEd to call that script with the transformed msi, and incorporate any changes into the original transform.
This provides "automatic transform support" for external tools or scripts.
Note that the temporary msi file will not be in the root of the external source tree, so tools that require the external source tree may not work correctly.