How to assign the default installation path during upgrades
This help topic refers to a previous version of InstallMate. It has not been updated for InstallMate 9 yet.
Note: From release 3.4.2468 onwards, the action below is included in all new Tarma native projects. You only need to perform this procedure to update projects that were created with earlier versions of InstallMate.
During product upgrades, it may be useful to preset the default installation path to the same path as the previous version uses. You can achieve this as follows:
- Create a Set Variable action in the DoFirstInstallDir action sequence, and move it up until it appears at the start of the sequence.
- Set its parameters as follows:
- Symbol name - INSTALLDIR
- Symbol value - <InstallLocation>
- Condition - InstallLocation
All this assumes that your main installation folder has the INSTALLDIR alias; it does so by default.
Explanation: InstallLocation is a registry lookup of the previous version's install path; the Condition makes sure that the INSTALLDIR path is only updated if there is indeed a previous version.
The screen shot below shows what the result should look like: