When changing DefaultDirName changes occur in the in the script in the [Setup] section of the DefaultDirName=,
When rerunning Inno Setup with this change this wil only take effect when in the [Setup] section is added:
UsePreviousAppDir=no
Maybe something to add in InnoScript?
That is only the case when you are installing over a previous installation. For a new installation that is OK.
If you want to add UsePreviousAppDir into the script just add it into a template under the section [Setup] and include it in your project. It will automatically be include on the next gerneration of the script.
Thanks,
I added it in the template and it was included at the end of the [Setup] section. Need it to be before the DefaultDirName= or is order not important here?
No, order is not important. The compiler will look for what it needs. The sections do not have to be order either.