Archive: Invalid installation path on app upgrade


Invalid installation path on app upgrade
Hi,

Did anyone face a problem with incorrect installation path during app upgrade?

I've tried the simple scenario:

1) Created a simple script using HM NIS Edit tool. The script install Notepad to Program Files\App 1.0

2) Then I upgraded the script to version 2.0, e.g. I changed all references to 2.0 and added "ExecWait '$R0 /S _?=$INSTDIR'" to install event handler. The app should now install to Program Files\App 2.0

3) I'm installing v1.0, then I run setup for the v2.0, it detects the previous version, removes it (good) and then it suggests the installation path as Program Files\App 1.0 (bad), note it happens in the installer for v2.0!

Does anyone know why it happens? I've attached those scripts.

Thanks,
Nick


It is caused by InstallDirRegKey instruction in your test2.


Originally posted by pospec
It is caused by InstallDirRegKey instruction in your test2.
Thank you for your response. But I'm not sure how I can fix that, what would be a solution for my case?

Best regards,
Nick

Delete InstallDirRegKey line in your test2.


Originally posted by pospec
Delete InstallDirRegKey line in your test2.
Thank you very much. It worked for me:)