InnoSetup: don't uninstall changed files

后端 未结 2 2006
滥情空心
滥情空心 2021-02-06 03:17

How to tell InnoSetup to not uninstall (text) files which had been changed by the user (== are different from those installed by InnoSetup)?

Or maybe more difficult: whe

2条回答
  •  生来不讨喜
    2021-02-06 04:04

    Inno can't do this check natively.

    To not replace changed files during install, you'll need to use custom [Code] to do a checksum and compare against a known good value that is precomputed or saved from the previous install.

    To avoid removing them during uninstall, you'll need to disable Inno's own uninstall for that file and check against the same checksum before removing them, again in [Code].

    Note that it's better to keep any files the user can edit outside of the setup to handle this situation better and to correctly adhere to the application guidelines.

提交回复
热议问题