Old 11th May 2020, 07:55   #1
Junior Member
Join Date: Apr 2020
Posts: 7
Write rollback information into uninstaller


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...
NROLF0016 is offline   Reply With Quote
Old 11th May 2020, 11:46   #2
Anders's Avatar
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,356
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.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 11th May 2020, 13:13   #3
Junior Member
Join Date: Apr 2020
Posts: 7
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
NROLF0016 is offline   Reply With Quote
Old 13th May 2020, 15:50   #4
Major Dude
JasonFriday13's Avatar
Join Date: May 2005
Location: New Zealand
Posts: 901
Nice to hear some feedback about my plugin, glad it helps you out .

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump