Sometimes enterprise level packaging can be quite complex, having requirements for variables, sources, destinations, etc., that are all over the map — and all over the network.
For instance, what if you are working with application bundle files in an MSI that are not intended to be local to the device? In that case, how does one use a “public property” that contains a path to a network drive as the destination for files to be installed in a basic MSI?
Well, that leads us to this item from Kathy at the Flexera Community Forum:“If you’re installing the file through a component, you can use a type 35 custom action sequenced after CostFinalize to set the destination folder for the component to the value in the property.”
This translates to using a “Set Directory” custom action.
- Create a new component.
- Under the new component, create a folder under a location that will always exist (such as under the INSTALLDIR/TARGETDIR location).
- Add any files needing to be installed to said folder.
- Create a public property with the full destination path as its value (where you want the files to end up eventually).
- Create a “Set Directory” custom action.
- Source of the CA is the directory created in Step 2.
- Target of the CA is the public property created in Step 4 (inputted as [PUBLIC_PROPERTY]).
- Leave the rest of the CA choices as the default options aside from the “Install Execute Sequence”. Change the setting to “After CostFinalize”.
- Complete the CA with default options.
The public property can be populated through many different means (a VBS, command-line, etc.) making it quite flexible. The files will install to the location specified in the public property!