Skip to content
⌘ NSIS Forum Archive

Write rollback information into uninstaller

4 posts

NROLF0016#

Write rollback information into uninstaller

Hi,

this is more a general question. Is it possible to write addtional information into te uninstaller during installation process? The original state/value of an environement variable is a good example. This information could then be used to restore original settings.


At the momen I see three options
1) Write data into the registry
2) Write a rollback.ini which is then read by the uninstaller
3) Store data directly or as attachement inside uninstaller.exe

Actually I would prefer #3

Appreciate advice from experts...
Anders#
NSIS does tolerate data appended to the end of the exe, see https://nsis.sourceforge.io/ReadCustomerData

Restoring data this way is always going to be problematic. What if another installer appends its data after you? If you change something like %path% it would be better if you just look for and remove your own $InstDir. https://nsis.sourceforge.io/EnVar_plug-in supports this.
NROLF0016#
I agree it can be problematic in cases whre different programs are using the same variable such as path. But it's good to know that functionality is there. Sounds very interesting.

BTW, I am using EnVar Pluging already. Great feature.

Thank you