Help making a smart installer
Hello everyone, I have recently started working with NSIS and it has impressed me a great deal. Unfortunately the advanced parts of NSIS is a bit confusing for me which has ended up with me trying to accomplish something without much success. What I am trying to do is make an installer that contains 2 sections, section A and section B that work in a special way (I will try to explain without confusing everyone).
Now lets take section A, when the installer starts it checks the registry to see if there is a registry key containing the version number, it the key doesn't exist section A automatically selected for installation, but it can be unselected manually. If the key does exists, the installer checks the version number and compares it to the version being installed, should the version being installed be newer then the one installed then section A is automatically select for installation with the possibility to manually unselect it, but if the version being installed is older then the one installed then section A is unselected and disabled so that it can't be manually selected again.
Section B is exactly the same as section A except for that it is never automatically selected. The only time it is automatically select is if there is a registry key containing the version number and the version being installed is newer then the installed version.
Lastly the uninstaller has to take this into consideration. It should check if section A and section B is installed and offer to manually select which to uninstall while disable the possibility to uninstall a section if it is not currently installed. If only one is uninstalled while the other one remains installed it should not delete itself. It should only delete itself after no more sections remains installed on the system.
As mentioned I have been working on this for a long time, but unfortunately my HDD containing all this work stopped working and I was stupid enough to not make any backups so I need to start at the beginning. That's why I decided to ask here first before starting this time so that I can do it right from the beginning. Although I have read the documentation, looked over the wiki, studied scripts and searched both this forum and online I can't seem to find a way to accomplish my goal. The frustrating part is that I feel I got really close and that some of the information I came over such as here http://nsis.sourceforge.net/Managing...ons_on_Runtime and here http://nsis.sourceforge.net/Two_inst..._one_installer and possible also in this post here http://forums.winamp.com/showthread....hreadid=262092 might contain exactly what I am looking for, but that I am to blind to see it. Any suggestions or help would be greatly appreciated, thanks.