Archive: Upgrade Code Explanation


Upgrade Code Explanation
Ok, so my installer can detect if it is already installed, and can launch the uninstaller from the previous version before the new files are installed. The uninstall process launches in an Upgrade section.

Now here's the crazy thing, it wasnt working using

nsExec::Exec '"$INSTDIR\uninstall.exe" /S'

But I found this code in the archive here to do this very thing, and the code shows the upgrade process like this:
ExecWait '$R0 _?=$INSTDIR'

So I changed my code accordingly, and now the upgrade magically works. So what on earth does this _?=$INSTDIR option do??

See the FAQ:

http://nsis.sourceforge.net/index.ph...&tx_faq_faq=14


Thanks, I looked everywhere else but the FAQ for that answer, searched the forums, searched the archive, searched through the NSIS source code even.

Maybe it should be pointed out in the NSIS help file so other idiots like me dont waste time with this :D