Page 1 of 1

How to avoid uninstall of changed files

Posted: Thu Dec 01, 2016 6:07 am
by mikKummerfeld
Hello,

for one of our customer we must include some configuration files in our setup and after setup process our applications are modifing these files.
How can I keep this CHANGED files after uninstallation? New files still exist, but changed files are gone.

Thanks
Heiko

Re: How to avoid uninstall of changed files

Posted: Thu Dec 01, 2016 11:17 am
by FrancescoT
Dear Heiko,

to keep such files just don't include them with the MSI database. In this way those files will be not removed on un-install.

In other words, you may use a similar approach just after Apply Install;

Code: Select all

    ....
    Apply Install (get result into variable SUCCESS)
    if Variable SUCCESS Equals COMPLETE
      Set Variable NATIVE_ENGINE to TRUE
      Install Files <my File path> to $TARGETDIR$
      Set Variable NATIVE_ENGINE to FALSE
    end
    ...


Hope this helps you.

Regards