|
![]() |
| Altering one folder unexpectedly also effects others |
Please consider this code:
<$DirectoryTree Key="MAYCHANGE" Dir="[ProgramFilesFolder]\a\b"> <$DirectoryTree Key="INSTALLDIR" Dir="[ProgramFilesFolder]\a\b\c\d">
In the above MAKEMSI only creates those directories it needs and so for the "INSTALLDIR" tree it first created the folder "d" then "c" then works out it already knows the rest as "MAYCHANGE". This means that the "INSTALLDIR" subtree has become "rooted" to "MAYCHANGE".
At install time if you alter "MAYCHANGE" then you will also effect "INSTALLDIR"!
It may be better to use the "Directory" command to define the directory that may change as MAKEMSI doesn't keep track of these, if the value actually also gets overriden at run time then this is an example of how the directory could be defined:
<$Directory Key="ALWAYSCHANGED" PARENT="<$AnyDir>" Dir="ALWAYSCHANGED">
![]() | ![]() |