Archive: Best upgrade practice for a program


Best upgrade practice for a program
Hello!
I make an installer for a program, and there should also be possibility to install additional modules in the future. A customer can buy one and one module. One module may consist of many files. A new version of a module may consist of fewer/more files than an older version.

How is the best way to handle upgrading of one simple module? At an upgrade I would like to remove all files which belongs to an older version.

Should I back-up all files for the installed program (with modules), install new single module, and then copy back from the back-up the other modules which was not upgraded?

Or does NSIS have some built-in functionality to handle the situation?

I will appreciate all suggestions...

Thanks,
best regards frode


same problem. well i just created an update tool that uses the same code to install files but inverted it were it deletes them.

~~~original code~~~
Section "Dummy File" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "Dummy Files"
SectionEnd

~~~My little mod~~~
Section "Delete Unused Files" SET02
SetOutPath "$INSTDIR"
Delete "Dummy File"
SectionEnd

It works ok but im sure theres a plug-in for this!


Use the practice that NSIS uses, uninstall old before installing.